> I wrote very simple program demostrating some GUI activities (changing
> JPanel background color and tray icon). The problem is that my program
> freez when I popup tray icon menu (right click) ! :(
I tried your program, and the same thing happens here on WinXP.
> Maby somebody know what I am doing wrong and how to use PopupMenu
I woudn't be surprised if the popup menu is run in a modal loop from inside the
Windows implementation of AWT. If that /is/ so, then I don't think you'll be
able to avoid blocking the EDT while the menu is popped up.
-- chris
gethostbyname@gmail.com - 28 Feb 2007 02:28 GMT
On 27 fev, 16:25, "Chris Uppal" <chris.up...@metagnostic.REMOVE-
THIS.org> wrote:
> kermi...@gmail.com wrote:
> > I wrote very simple program demostrating some GUI activities (changing
[quoted text clipped - 10 lines]
>
> -- chris
I am a newbie to JAVA. :-)
I has a doubt about the
"jf.setVisible( true ); "
Isn't recommended to put it after the addition of components to the
JFrame in main? Before the loop while in that example.
Sometimes, when I don't do it on WinXP, the window components aren't
drawn in window on first time. I need to resize the window to
components to apper.
thanks you
gethostbyname
kermitas@gmail.com - 22 Mar 2007 17:59 GMT
Hi,
thanks for help.
I am closing this subject.
My solution can be found at http://forums.java.net/jive/thread.jspa?threadID=23466&tstart=0
.
( java.net Forums » Java Desktop Technologies » Swing & AWT »
TrayIcon PopupMenu or JPopupMenu ? )
Bye !