I am a newbie into java swing and have an application written in
swing and awt. I have compiled this application on Linux and when I
run this application the toolbars and menubars do not appear when the
GUI appears. If I resize the mainframe, the toolbars/menubars start
appearing.
Another strange thing is that it works fine on KDE.
When I use Java 1.6 then everything works fine on GNOME as well. But
my problem is that I have to get it workingon Java 1.5. Please help
me
on what should I do and how should I move ahead.
PS: I tried changing look and feel but no use. I will not be able to
post the app code here as it is a huge one.
Any help would be appreciated.
Thanks,
Deepanshu
> Hi,
>
> I am a newbie into java swing and have an application written in
> swing and awt. I have compiled this application on Linux and when I
> run this application the toolbars and menubars do not appear when the
> GUI appears. If I resize the mainframe, the toolbars/menubars start
> appearing. Another strange thing is that it works fine on KDE.
You might try implementing the ComponentListener interface in the
problem component to see if it's getting the relevant event(s).
Also, verify that you have not overridden paint() without invoking
super(); verify that you are running on the EDT:
<http://mindprod.com/jgloss/swingthreads.html>
> When I use Java 1.6 then everything works fine on GNOME as well. But
> my problem is that I have to get it workingon Java 1.5. Please help
> me on what should I do and how should I move ahead.
If it's a problem in your 1.5, you might look at the minor revision
number (java -version) and see if a later revision is available.
> PS: I tried changing look and feel but no use. I will not be able to
> post the app code here as it is a huge one.
This can be daunting, but trying to reproduce the problem in a short
example may suggest where to look in your larger code:
<http://pscode.org/sscce.html>
> Any help would be appreciated.
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
If you mean Swing and AWT, then - don't mix them
together.
Mixing Swing and AWT components is a recipe for
disaster unless you can explain why doing so in
your GUI will *not* cause 'strange rendering
artifacts'.
--
Andrew Thompson
http://pscode.org/
I debugged it to SystemLookAndFeel being set by java code which
enabled gtklookandfeel and hence the problem. I modified to use
CrossPlatformLookAndFeel and everything works fine now..
I have appended the solution for other's reference.
Thanks for your time once again.
Cheers,
Deepanshu
** Complex jobs seem to miss the iota part when they are done **