Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange swing problem (objects not displayed)

Status
Not open for further replies.

dexter195

Programmer
Jun 18, 2003
220
EU
hi
ive come accross this very strange problem. ive uninstalled any trace of any previous versions of java including the jdk and the runtime environments. (this included removing and registry entries) i then installed jdk 1.5 on my machine with the classpaths set up propperly.

for some reason any swing component that i try to display on my gui wont appear but any awt component will come up on the screen.

this also seems to happen to other programs that ive run from jar files and exe's that use swing components. gui genie is a prime example. i tried to use it to make sure my code was correct but when i opened it up nothing appeared only the ouier frame.

has any one come accross this problem before or know of anyway to fix it.

thanks

 
hi stefan

here are the results.

echo %JAVA_HOME%
H:\Java\jdk1.5.0\bin

java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

the strange thing is that it compiles and runs the apps but it just wont display the swing. ive another pc with the same version of java on it and it displays everything just grand.

just a quick question, does the b64 in the 1.5.0-b64 stand for "beta 64 bit processing"???
 
JAVA_HOME should point to :

H:\Java\jdk1.5.0

not :

H:\Java\jdk1.5.0\bin

Then your PATH should add :

%JAVA_HOME%\bin

I'm not sure if "b64" means beta 64 bit - possibly not, my 1.4 install has "b03" - but I'm not sure. Did you download the 32bit or 64 bit version ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
i changed the classpath accordingly but its still not showing any of the swing objects. it was compiling everything else grand the way the classpaths were before.

i downloaded the 32 bit version from the sun website. its recking my head. i also installed the version of 1.5 i used at work ( and similar swing code was working using that version ) and it still made no difference.

could it have something to do with the virtual machine?

thanks for the help
 
Could you possibly have an old swingall.jar on your classpath somewhere?
 
the classpaths are clean of any java stuff bar the above which i added. the first time java was installed on this machine was only a few days ago and it hasnt worked at all.
 
@dexter "i changed the classpath accordingly but its still not showing any of the swing objects. it was compiling everything else grand the way the classpaths were before."

sedj didn't mention classpath at all, but the PATH.
Well - your PATH seems ok, but you have to understand the difference between PATH and CLASSPATH.


seeking a job as java-programmer in Berlin:
 
I've always understood the 'b' in the version to indicate 'build number'.

Is there any mileage in posting some of your code dexter195? Maybe you're doing something wrong which just happens to work in 1.4 but not 1.5.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
my code worked in both 1.4 and 1.5 on other machines. i ended up resorting to re-installing another copy of xp on my computer and that did the trick.

thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top