Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vikasu

macrumors newbie
Original poster
Nov 6, 2007
12
0
Hi All,

I hd created an application containing GUI controls of X types on Tiger (with JDK 1.5.0_06) using NetBeans IDE. The UI looks better, but when I ran my app. on Leopard (10.5) with JDK 1.5.0_13 the UI controls are distorted :confused:, why this is so? is that due to Java version (build no.) difference or due to Leopard UI, or due to some X reason.
Plz reply for the same...

Vikas
 

m1ss1ontomars

macrumors 6502
Oct 1, 2006
273
2
I hd created an application containing GUI controls of X types on Tiger (with JDK 1.5.0_06) using NetBeans IDE.

There you go; that's why. If you're programming in Java I don't think you can realistically expect your programs to always have a nice polished GUI. In fact, this thread should just be called "Java GUI problem".
 

therevolution

macrumors 6502
May 12, 2003
468
0
There you go; that's why. If you're programming in Java I don't think you can realistically expect your programs to always have a nice polished GUI. In fact, this thread should just be called "Java GUI problem".

:rolleyes:

Vikas, do you have any sample code you can post? Your problem description is kind of vague. By "X types," do you mean it's an X11 app (as opposed to Swing or SWT)?
 

garethlewis2

macrumors 6502
Dec 6, 2006
277
1
Considering he used X two times in his original post, it is obvious he is using X as in a variable in math.

And this has to be the most **** comment I have ever read.

There you go; that's why. If you're programming in Java I don't think you can realistically expect your programs to always have a nice polished GUI. In fact, this thread should just be called "Java GUI problem".

What a load of complete ********. That's like saying. Sorry you shouldn't use Swing, Sun are a complete bunch of ********* who can't program GUIS. If you want a GUI you should use Cocoa.

Look at Nimbus the new Look and Feel from Java6 and also look at Filthy Rich Clients, the book that shows you how to easily produce GUI's that compete with Cocoa, including lovely animated effects using a portable library using JOGL.
 

m1ss1ontomars

macrumors 6502
Oct 1, 2006
273
2
Considering he used X two times in his original post, it is obvious he is using X as in a variable in math.

And this has to be the most **** comment I have ever read.

There you go; that's why. If you're programming in Java I don't think you can realistically expect your programs to always have a nice polished GUI. In fact, this thread should just be called "Java GUI problem".

What a load of complete ********. That's like saying. Sorry you shouldn't use Swing, Sun are a complete bunch of ********* who can't program GUIS. If you want a GUI you should use Cocoa.

Look at Nimbus the new Look and Feel from Java6 and also look at Filthy Rich Clients, the book that shows you how to easily produce GUI's that compete with Cocoa, including lovely animated effects using a portable library using JOGL.

Well due to the original poster's bad grammar it's hard to correctly interpret his sentences. I'm not sure X as a variable is what he meant either.

Besides, Sun didn't even port Java to Mac OS X, so I hardly think you're interpreting my comment correctly either. Mostly because I'm joking. But you can't deny that Java apps sometimes have very real problems integrating with the OS. Nimbus looks very nice indeed, but it doesn't match the rest of Mac OS X.
 

vikasu

macrumors newbie
Original poster
Nov 6, 2007
12
0
X means JTextField, JButton, etc. J****, now the thing is that I am restricted to use Java 5, and the UI i made looks different on Tiger and different(bad) on Leopard, now I corrected it on Leopard and than ran the app on Tiger, now it appears bad on tiger, Why UI components are repositioning???
 

garethlewis2

macrumors 6502
Dec 6, 2006
277
1
If you are getting problems where JLabel and JButtons are being resized and even moved slightly, then the underlying AWT layer and Swing layer written by Apple, not the correct version by Sun is screwed. I'm surprised that more developers haven't been screaming about the supposed problems with the layout.

BTW what layout manager are you using. If you want it to look even resonable you should be using GridBagLayout.
 

therevolution

macrumors 6502
May 12, 2003
468
0
I work on Java Swing apps for a living (please hold the pity remarks :p). If there were some horrible, obvious bugs that went in with Leopard, I'm pretty sure I would have noticed. Nothing so far.

Without a more detailed description -- code, screenshots, anything -- there's not much we can do here.
 

vikasu

macrumors newbie
Original poster
Nov 6, 2007
12
0
I hv got two docs on this issue

http://developer.apple.com/releasenotes/Java/JavaLeopardRN/JavaLeopardRN.pdf

Now in this apple is saying that we hv changed the Aqua L&F in Java5 for Leopard, due to this the J****s(swing) are taking more space and resizing & repositioning. Now for its solution they hv added new features in that..

http://developer.apple.com/technotes/tn2007/tn2196.html

In this tech note they explained evry thing about their new controls. OK, now they work fine for Leopard, but the same code creates a very bad GUI on Tiger :( , and I am restricted to use the same, becoz my some client releases hv already gone, so change in the GUI will not be acceptible, all I can do is make a new .app for Leopard...:eek:, IS THIS THE ONLY SOLUTION?????
 

therevolution

macrumors 6502
May 12, 2003
468
0
Still not going to show us any code? I have a hunch the problem lies there. Bad use of layout managers, for example.

I guess you can litter your code with these:

Code:
if (System.getProperty("os.version").contains("10.5"))
{
    // do Leopard stuff here
}
else
{
    // do Tiger (non-Leopard, really) stuff here
}

Not sure what else to tell you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.