Page 1 of 1

r5144 JComboBox

Posted: Sun Jan 22, 2012 4:06 am
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

Re: r5144 JComboBox

Posted: Sun Jan 22, 2012 6:05 am
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

Re: r5144 JComboBox

Posted: Sun Jan 22, 2012 6:51 am
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

Re: r5144 JComboBox

Posted: Sun Jan 22, 2012 6:58 am
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

Re: r5144 JComboBox

Posted: Sun Jan 22, 2012 7:49 pm
by BiggBoss
also be sure you are using jdk 7 for your project instead older versions

Re: r5144 JComboBox

Posted: Tue Jan 24, 2012 4:17 am
by jcrypto
thx BB im sure!;) i have no problems with it.

Re: r5144 JComboBox

Posted: Tue Jan 24, 2012 4:23 am
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 ;)

Re: r5144 JComboBox

Posted: Tue Jan 24, 2012 4:45 am
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.

Re: r5144 JComboBox

Posted: Tue Jan 24, 2012 4:53 am
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

Re: r5144 JComboBox

Posted: Tue Jan 24, 2012 5:11 am
by MELERIX
and btw about JComboBox warnings, it was fixed here: Changeset 4772

Re: r5144 JComboBox

Posted: Tue Jan 24, 2012 5:29 am
by jcrypto
MELERIX wrote:and btw about JComboBox warnings, it was fixed here: Changeset 4772
i have no anything against your love to swing