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
hi, need advice on the following. i have an app server container (only OC4J and no portal,forms etc) hostname abc.test.net installed with the option to registered to the sso server (http://mylogin.test.net), which is on a physically seperate machine. [More]
Hi, Any one knows how to send sap script output to users in the form of an email. Is there any other way to send it apart from sending the script output to spool and converting the spool to PDF and send that PDF to user? It would it helpful for me if [More]
a single vhs tape containing six hours of video is captured to mpg format. as you can imagine, the quality is lower than one might like. studying every video effect offered by pp4 would take me a lifetime. can you suggest a few effects i might look a [More]
Hello, I am suing Firefox in the kiosk mode using R-Kiosk, and I have hidden the exit button, urlbar and searchbar in fullscreen using userchrome. I would like to put my bookmakrs instead of the urlbar, using userchrome - simple drag and drop does no [More]
I have a problem with my audiogram 6. I'm really new in home recording and I've always recorded one track per time (guitar first then the bass then drums then vocals). I read that GB allows you to record in multitrack...this is great to me but...I JU [More]
Every time I open the Creative Cloud menu icon it switches my OSX view to a random other desktop space, usually my fullscreen Evernote. This is either a strange bug or very silly default behavior. I don't want to have to unpin it from the menu bar ju [More]
hi all please when i navigate in tree by mouse i want to get the node value and assign it to an item in the form( i get it by use when-tree-node-selected ) ftree.get_tree_node_property and get the value use system.trigger_node but the question is :- [More]
I have a scipt that crashes when exporting within a loop. The export type is via a third party plugin. So yes I'm hoping they can help me, but they said, what they have provided is provided as is. My questionto the forum is what can I clear while the [More]
I know that I can burn songs that I download from Itunes to cd, but what about movies and tv shows that I buy? Can those be burned to dvd for back up, in case of computer crashing and such?When backing up videos from itunes, it has to be burned as a [More]
I purchased a book from Kobo Books but when I try to download to Adobe Digital Editions it comes up with a message saying "one or more downloads are not finished.  Do you want to resume pending tasks?  When I click ok it comes up with this message: C [More]