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
How to pick from SAP the customer open line items ? Per the client, they need the balance amount currency for each invoice . for eg : there is an invoice for $1000 and an incoming payment of $200 . Client needs in a single line under two columns Bala [More]
I need this report date wise and warehouse wise... please help .. Declare @FromDate Datetime Declare @ToDate Datetime Declare @Whse nvarchar(10) select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]' select @ToDate = max(S1.Doc [More]
I got a new computer and downloaded iTunes. When I tried to download music that I already purchased I got a message that my computer was not authorized although my iPod was plugged in and it was recognized. I don't see anywhere that I can register my [More]
i have got a new phone and my old phone was wiped.  I backed it up but where can i find all my contacts?Unfortunately your other contacts may be lost.  Contacts are not saved in iTunes; they are only synced with iTunes to a supported program such as [More]
Hi, I have those lines of script that place the pdf into InDesign, but in the process new frame gets created in which the pdf is placed, and I need it to be placed into my existing frame. How could I do it:     var myRectangle = myDoc.pages[0].rectan [More]
We have a web based flash interface that allows customer to design a custom product online. The problem is that the flash then creates a PDF and that PDF never ACCURATELY matches what the customer designed in the flash application. The line and lette [More]
Dear all , OS AIX , DB Oracle , SAP ECC6.0 , Tivoli Storage Manager Offline Backup got error Status shows Finished with Error   (Backups are fired through DB13) Retune Code :0005 Error during processing Detail Logs: BKI0027I: Time: 12/10/09 05:19:06 [More]
I have rsyncd running in daemon mode, and I am able to successfully backup files from my Windows PC to my Arch Linux PC over the LAN. Unfortunately on the Linux side, there is no logging when this connects!  Here is relevant config from rsyncd.conf: [More]
Hi Friends, Right Now, I am working with the Function-module, REUSE_ALV_HIERSEQ_LIST_DISPLAY, Which Displays the Service order data such as AUFNR, Auart, werks, erdat, ernam etc.I am Also displaying the Check box, so that once the data is diplayed in [More]
I've been moving DHCP off our 2008r2 domain controllers to 2012r2 member servers and discovered that in our locations still running dos that those clients are not getting and ip address, any ideas?yes it is authorized, (works for everything but some [More]