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 have researched this as much as I can but cannot find a solution. I had my iPhone 4 synced to my Window Vista Home Premium PC using iTunes just fine until January when the PC motherboard crashed. No data was lost and all contacts have been restored [More]
Whenever I try to open a file using Adobe Acrobat 9.5, I get the message:  "Adobe acrobat 9.5 has stopped working"  "A problem caused the program to stop working correctly.  Please close the program".  Acrobat reader 9.5 appears to wor [More]
I am trying to install Acrobat Pro XI an a computer running Windows 7 64-bit Before I can install I get the following error: I exited the install and ran vc_red from the Adobe CD. Started install of Acrobat XI and got the same error. I exited the ins [More]
How to connect Apple TV with iPad ?Welcome to the Apple Community. Assuming both devices are on the same network and that AirPlay is not turned off on the Apple TV, then simply tap on the screen when you are watching content you wish to stream to you [More]
We are changing the way we're processing files in that where we used to receive hundreds of small files throughout the day, we are now going to have these files batched into larger files that get dropped to our incoming Biztalk directory. I'm concern [More]
I have implmented SQL query base report region and want to add that combobox with number or returned records. On page where this combo exist there is no such an aditional item...so my question is how to ad it separatelly? THX!Found-Pagination schemes [More]
I got the problem when I was putting a book together. I tried to assemble the book and got the error "Unable to Assemble Book-NSPlaceholderMutableString initWithString: nil argument" The error seems to come up when the Title or Subtitle field is [More]
For about a year, I've been creating my jar file the following way: - Unjar all third party jars into my class tree (JDOM, JFreeChart, etc). - Jar everything up I just incorporated Java Mail into my app...but now I get a SecurityException when I try [More]
Hello folks.  After updating my MacPro (early 2008) to Yosemite I've encountered numerous compatibility issues.  I'm not certain if my current Compressor has anything to do with that update or not, but, when I try to burn a blurry just under 2 hours [More]
I'm new on AIA and ESB. I have a problem on server with Concrete WSDL's location in deployed ESB: location=http://localhost:9700/... (it refers to localhost!!!) I guess somewhere of my ESB configuration is incorrect. However I do have correct "Virtua [More]