Sitemap

Amicuk Programming Answers

Titlebar-Icon not showing

-0001-11-30   Views:0

Advertisement

Hello Java World I can load the Icon, but it will not be shown in the titlebar. I load that icon from local hdd. I show my JFrame like this: getJFrame1().setvisible(true); // and private javax.swing.JFrame getJFrame1() {      if (ivjJFrame1 == null)

Hello Java World
I can load the Icon, but it will not be shown in the titlebar. I load that icon from local hdd.
I show my JFrame like this:
getJFrame1().setvisible(true);
// and
private javax.swing.JFrame getJFrame1() {
     if (ivjJFrame1 == null) {
          try {
               ivjJFrame1 = new javax.swing.JFrame();
               ivjJFrame1.setName("JFrame1");
               ivjJFrame1.setDefaultCloseOperation(
                    javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
               ivjJFrame1.setBounds(106, 109, 530, 240);
               ivjJFrame1.setContentPane(getJFrameContentPane());
               //get new imageIcon
                                      ImageIcon image = new ImageIcon("J:/bmp/bmp/act.bmp");
               ivjJFrame1.setIconImage(image.getImage());
               ivjJFrame1.setTitle("my TabTest");
          } catch (java.lang.Throwable ivjExc) {
               handleException(ivjExc);
     return ivjJFrame1;
}Any help out there ?
Everythings works fine, but no Icon to be seen.
The Icons size is 1K reported from w2k.
Tanks Hanns

The replay answer
Advertisement
Stefano,
If You are using backslashes then You have to replace one "\" with "\\" because \ is an escape sequence and expects a legal char as next.
So using slashes will be allright wiht all systems
public ImageIcon(String filename)
Creates an ImageIcon from the specified file. The image will be preloaded by using MediaTracker to monitor the loading state of the image. The specified String can be a file name or a file path. When specifying a path, use the Internet-standard forward-slash ("/") as a separator. For example, specify:
new ImageIcon("images/myImage.gif")
(The string is converted to an URL, so the forward-slash works on all systems.)
Parameters:
filename - a String specifying a filename or path

Go to See the other 6 answers

New Modern UI app titlebars misbehaving when using stylus (pen) on tablet

Category:DefaultRelease time:2015-10-11Views:130

When switching from the desktop to a Modern UI app by tapping the corresponding taskbar button the new titlebar of Modern UI apps behaves differently depending on input method: 1. Finger: the titlebar is not shown at all (correct behaviour) 2. Mouse:[More]

Application switching/windows and titlebar problem

Category:DefaultRelease time:2015-10-11Views:130

Hi, Apologies if this isn't the best place to post this, but it's a problem that relates to switching between applications in OS X, and I haven't yet found an answer through Director forums. So... I am working on a (cross-platform) Director project t[More]

Add button to JInternalFrame's titlebar.

Category:DefaultRelease time:2015-10-11Views:130

Hi, how do i add a button next to the minimize/maximize/close buttons in the JInternalFrame's titlebar. Thanks in advance.Looks like it's hard to do. http://forums.java.sun.com/thread.jsp?forum=57&thread=113454 However you can put a popup menu on the[More]

Is it possible to show the sequence name in Premiere Pro's window titlebar?

Category:DefaultRelease time:2015-10-11Views:130

Currently the Premiere Pro titlebar displays "Adobe Premiere Pro" and the project file (ie. D:\Videos\2014-04-30 - PPK\_Project Files\PPK.prproj) I was wondering if anybody knows a way to also display the name of the current sequence you're edit[More]

ITunes 7.4.3.1 skinned titlebar

Category:DefaultRelease time:2015-10-11Views:130

Hey there i just got a new Computer which is with Windows Vista....i installed the newest iTunes version. Now when I'm starting iTunes the Titelbar is skinned like on MACs, I ricghclick there, choose Options nad reset the function "Skin your Titlebar[More]

Cinnamon remove fullscreen titlebar

Category:DefaultRelease time:2015-10-11Views:130

With various addons, settings and themes I cannot get rid of the damn titlebar in fullscreen applications like wine and some games (enemy territory). Along with VLC fullscreen, Firefox YouTube fullscreen etc. are working fine. On linuxmint etc. eithe[More]

Right-clic​king titlebar halts Ethernet

Category:DefaultRelease time:2015-10-11Views:130

I have an application that is receiving a stream of 19B messages over Ethernet at 12.8kHz. Within the 19B, I have a counter used to check integrity of the message ensuring I do not miss any messages. The stream works, and my application can process t[More]

How to show a variable at titlebar of alv screen

Category:DefaultRelease time:2015-10-11Views:130

Hi, I want to say that : Data: number type i. Number  = 100. Set TITLEBAR 'ABC' . 'I want to say'  100 'of'  500 'records have been selected'. How can I do that? Thanks.Declare your TITLEBAR like this way and while calling your title bar Data: number[More]

Customize jinternalframe titlebar

Category:DefaultRelease time:2015-10-11Views:130

hai friends, can anyone help me in customize jinternalframe titlebar. 1.how to change the titlebar background color. 2.how to change titlebar height. 3.how to change border color.. pls anyone helpmehai friends, can anyone help me in customize jintern[More]

Titlebar on Solaris does not display Japanese characters

Category:DefaultRelease time:2015-10-11Views:130

I have a Java Swing application (running on 1.6.0_06) that sets Japanese characters on the titlebar of Dialogs. The Japanese characters display correctly when the application runs on Windows but displays as ? when run under Solaris. Details of the So[More]

Change the parameter in the titlebar

Category:DefaultRelease time:2015-10-11Views:130

Hi Everyone, I have pop up screen, where in it changes the titlebar accordingly on which grid it is. Now is it possible to pass a variable in the titlebar which keeps changing accordingly based on the columns of the grid. Any help will be of great us[More]

Hot
I am trying to get a list of documents that are currently "Pending" for approval. The "out of the box" CreateDocumentRequest workflow has been configured to require approval of content uploaded to a target area of the repository. If un [More]
I signed up for Skype but nobody can see me because my WebCam somehow no longer exists. When I go into preferences it says "There is no camera connected to this computer". I know there's a camera I can see it right in front of me. So how do I ge [More]
I have been getting very similar sound problems on my notebook as posted by most: internal speakers work on original Audio HD drivers, but there is no sound when I connect external speakers or headphones. I up-graded the audio drivers to IDT HD Audio [More]
Hi We are using OBIEE11g Linux box.When we install 11.1.1.6 configuration tool return error in "Create ASInstance" Error Log: Caused by: oracle.as.provisioning.util.ConfigException: Error creating ASInstance instance1. Cause: An internal operati [More]
hello; I'm uploading images via filereference.upload ... works fine when testing on local machine with apache. once I port everything to my web-based server ( shared server with a webhosting company ), the upload fails. - do not get any errors such a [More]
I have 2 point security for AppleID. My iPhone 4S is listed as my trusted phone to text. No tel. no. is given. I am updating to iPhone 6Plus with same tel. no. Do I need to change anything for the sign in verification?Of course You can also add your [More]
Would I be correct in assuming that sending the xapi: tags through the regular concurrent request engine would be a fultile exercise in order to burst an invoice batch into multiple PDFs? Could somebody please confirm that I must use a JAVA concurren [More]
Greetings, I need to quickly setup an inbound 810 invoice integration in a 46C ERP environment. I would like to leverage the INVOIC02 IDoc and it's accompanying ALE services to import vendor invoices into A/P. These vendors are finished goods vendors [More]
Hi All, I am trying to understand how Movement types are linked to account assignment. In IMG - MM - Valuation and account assignment - Account determination - Account determination without wizard (OMWN) In this transaction or setting i do not see my [More]
Adobe Media Encoder has disappeared from the CC list of apps available, and I need to reinstall.  What happened to it? I have Windows 7, HP elitebook 8560w laptop - my video drivers crashed,  which caused problems with any software that used them. So [More]