r5144 JComboBox

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
jcrypto
Posts: 18
Joined: Thu Jan 19, 2012 9:25 pm

r5144 JComboBox

Post by jcrypto »

first of all

http://docs.oracle.com/javase/7/docs/ap ... boBox.html

"Warning: Swing is not thread safe. For more information see Swing's Threading Policy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder. "

problems in current unstable r5144 while build

Buildfile: /home/developer/projects/unstable/build.xml

clean:
[delete] Deleting directory /home/developer/projects/unstable/build

checkRequirements:

getChangelogDateVersion:

init:
[mkdir] Created dir: /home/developer/projects/unstable/build
[mkdir] Created dir: /home/developer/projects/unstable/build/classes

compile:
[javac] Compiling 1560 source files to /home/developer/projects/unstable/build/classes
[javac] /home/developer/projects/unstable/java/com/l2jserver/tools/gsregistering/RegisterDialog.java:46: type JComboBox does not take parameters
[javac] private final JComboBox<ComboServer> _combo;
[javac] ^
[javac] /home/developer/projects/unstable/java/com/l2jserver/tools/gsregistering/RegisterDialog.java:68: type JComboBox does not take parameters
[javac] _combo = new JComboBox<ComboServer>();
[javac] ^
[javac] /home/developer/projects/unstable/java/com/l2jserver/tools/gsregistering/RegisterDialog.java:108: operator + cannot be applied to getHeight,double
[javac] final double height = _combo.getPreferredSize().getHeight()+ 4 * textPane.getPreferredSize().getHeight()+btnSave.getPreferredSize().getHeight();
[javac] ^
[javac] /home/developer/projects/unstable/java/com/l2jserver/tools/gsregistering/RegisterDialog.java:108: operator + cannot be applied to <null>,double
[javac] final double height = _combo.getPreferredSize().getHeight()+ 4 * textPane.getPreferredSize().getHeight()+btnSave.getPreferredSize().getHeight();
[javac] ^
[javac] /home/developer/projects/unstable/java/com/l2jserver/tools/gsregistering/RegisterDialog.java:108: incompatible types
[javac] final double height = _combo.getPreferredSize().getHeight()+ 4 * textPane.getPreferredSize().getHeight()+btnSave.getPreferredSize().getHeight();
[javac] ^
[javac] required: double
[javac] found: <null>
[javac] 5 errors


solvation

/RegisterDialog.java:46:
private final JComboBox _combo;

/RegisterDialog.java:68:
_combo = new JComboBox();


compile parameters

openbsd 4.9, jdk-1.7.0.00beta122p0v0, ant-1.8.2
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: r5144 JComboBox

Post by MELERIX »

why you are using JDK 7 Beta ? :S

if there is already Stable version in Oracle website... http://www.oracle.com/technetwork/java/ ... index.html
jcrypto
Posts: 18
Joined: Thu Jan 19, 2012 9:25 pm

Re: r5144 JComboBox

Post by jcrypto »

hm, realy... few days ago it was not officialy provided

http://www.java.com/en/download/faq/java7.xml

Why is Java SE 7 not yet available on java.com?

The new release of Java is first made available to the developers to ensure no major problems are found before we make it available on the java.com website for end users to download the latest version. If you are interested in trying Java SE 7 it can be downloaded from Oracle.com
Last edited by jcrypto on Sun Jan 22, 2012 7:01 am, edited 1 time in total.
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: r5144 JComboBox

Post by MELERIX »

jcrypto wrote:hm, realy... few days ago it was not officialy provided
is officially released since long time ago...

Java 7 official Stable release was in July 07, 2011.

also Java 7 Update 1 in 2011-10-18
and Java 7 Update 2 in 2011-12-12

http://en.wikipedia.org/wiki/Java_version_history
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: r5144 JComboBox

Post by BiggBoss »

also be sure you are using jdk 7 for your project instead older versions
Image
jcrypto
Posts: 18
Joined: Thu Jan 19, 2012 9:25 pm

Re: r5144 JComboBox

Post by jcrypto »

thx BB im sure!;) i have no problems with it.
jcrypto
Posts: 18
Joined: Thu Jan 19, 2012 9:25 pm

Re: r5144 JComboBox

Post by jcrypto »

MELERIX wrote:
jcrypto wrote:hm, realy... few days ago it was not officialy provided
is officially released since long time ago...

Java 7 official Stable release was in July 07, 2011.

also Java 7 Update 1 in 2011-10-18
and Java 7 Update 2 in 2011-12-12

http://en.wikipedia.org/wiki/Java_version_history
bla, bla, bla MEL, the major goal of the topic was to show the thread safety problems of swing framework, but not my problems with jdk ;)
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: r5144 JComboBox

Post by MELERIX »

about these build errors, there is no problems if you use a proper Java 7 version, trouble is that you are using a incomplete version in OpenBSD which don't have full Java 7 compatibility.
jcrypto
Posts: 18
Joined: Thu Jan 19, 2012 9:25 pm

Re: r5144 JComboBox

Post by jcrypto »

ok, thx for advice, i will set obsd 5.0 on my real platform, it,s just a test build, i dont want to build jdk from ports to avoid time waste for troubleshooting. and btw, problems with swing still exists, chech the link that i put at the begining of the topic, more properly, http://docs.oracle.com/javase/7/docs/ap ... boBox.html

Warning: Swing is not thread safe. For more information see Swing's Threading Policy.
http://docs.oracle.com/javase/7/docs/ap ... #threading

also, swing is just the higher level shell for awt
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: r5144 JComboBox

Post by MELERIX »

and btw about JComboBox warnings, it was fixed here: Changeset 4772
jcrypto
Posts: 18
Joined: Thu Jan 19, 2012 9:25 pm

Re: r5144 JComboBox

Post by jcrypto »

MELERIX wrote:and btw about JComboBox warnings, it was fixed here: Changeset 4772
i have no anything against your love to swing
Post Reply