jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes is the Swing-GUI really platform independent? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "is the Swing-GUI really platform independent?" Watch "is the Swing-GUI really platform independent?" New topic
Author

is the Swing-GUI really platform independent?

Erwin Heil
Greenhorn

Joined: Sep 30, 2003
Posts: 11
in my current project, I noticed some strange behaviour of the GUIs LookAndFeel:
on one Computer, buttons of the app have yellow borders on MouseEvents,
on the other not. On one I can't see the colours of the buttons, that I wrote...
after checking possible reasons and as far as I can see, it depends on the J2SE - Version and the OS. I developed with j2sdk 1.4.2_03 on an Desktop-PC with XPPro.
Somebody else have the same environment on a notebook and can't see the button-background-colours. Another guy - same environment, but different notebook - can see the button-background! On the first notebook, there's j2sdk 1.4.2_03. After changing to j2sdk 1.4.0 the button-background-colours are visible!
I know it's kind of wired, but I'm wondering if somebody else made similar experiences with Swing-GUIs.
cheers, erv
[ April 27, 2004: Message edited by: Erwin Heil ]
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
What look and feel are you using?
Brian


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
Andy Nimmo
Greenhorn

Joined: Mar 30, 2003
Posts: 14
I don't think the problem you are describing is really a matter of platform independant as most people you ask would not believe different hardware running the same software as being different platforms. You did however mention that the problem was OS linked yet the only OS that you mention in your post was WinXP Pro, with your wording suggesting to me that all the notebooks you used had the same OS installed.
Have you tried running your code on a Linux box? What does it look like then? That would answer your platform independant question.
Also, have you tried using any other Swing Apps on the aforementioned notebooks? What was the outcome?
In the past I have had similar problems which were related to how I was laying objects out and setting their attributes, differences between the JRE's you mention may simply be down to minor changes in how certain events / situations are handled at Runtime.
As Brian asks, what L&F are you using? Have you tried a different L&L? Ho does that appear across the different systems you describe?
Luis Ernesto
Greenhorn

Joined: Apr 22, 2004
Posts: 9
i once had a similar issue, with the background's of a swing app, two machines with xp, we didn't knew what it was, and one of the guys at the office updated the drivers of his computer and uninstalled some games and it got normal.
Erwin Heil
Greenhorn

Joined: Sep 30, 2003
Posts: 11
well thanx for your comments so far!
I'm kind of busy these days, but I will answer your questions later, when I got some time to test.. As L&F we use windows, motif and metal, I'm not sure, if this problem only occured in the win-L&F, wich is the default...
cheers, erwin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is the Swing-GUI really platform independent?
 
Similar Threads
Why does this refuse to work?
Eclipse vs Netbeans
Button enabled property not refreshing on the panel
ActionListener and Event
BorderLayout question