Discussion:
absolutelayout novice question
Wolfgang Neckel
2005-04-26 15:34:01 UTC
Permalink
Hiyo all!

If I may be so bold as to ask another novice question:
What I like about the Design layout for building GUIs with NetBeans is
that there is also the possibility to use that AbsoluteLayout feature! :-)

That functions great on PCs where I have NetBeans installed. But if I just
want to be able to run the programm on another computer by using the .jar
file NetBeans build for me, I encounter the following problem:

java -jar JavaProject1.jar
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
org/netbeans/lib/awtextra/AbsoluteLayout

Does anyone have an idea what I am doing wrong? Thankx in advance!!

Regards,
Wolfgang
bluesun
2005-04-26 17:24:37 UTC
Permalink
I have encountered similar errors as well but not for using the layout class in general...but yes I would like to know the answer to that question as well. Not very useful when everything runs inthe IDE but it cannot be deployed! :-)

Wolfgang Neckel <***@xover.htu.tuwien.ac.at> wrote:Hiyo all!

If I may be so bold as to ask another novice question:
What I like about the Design layout for building GUIs with NetBeans is
that there is also the possibility to use that AbsoluteLayout feature! :-)

That functions great on PCs where I have NetBeans installed. But if I just
want to be able to run the programm on another computer by using the .jar
file NetBeans build for me, I encounter the following problem:

java -jar JavaProject1.jar
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
org/netbeans/lib/awtextra/AbsoluteLayout

Does anyone have an idea what I am doing wrong? Thankx in advance!!

Regards,
Wolfgang
M. Fecina
2005-04-26 17:39:59 UTC
Permalink
I'm pretty sure you'll need to include the AbsoluteLayout class
(and its dependents) with your jar file, unless there's a way you
can statically link it in the IDE, which pretty much does the
same thing (takes all the code necessary and builds with that as
opposed to dynamically linking at runtime (on another machine,
which doesn't have the IDE, and therefore lacks the
AbsoluteLayout class).

M. Fecina
Post by bluesun
I have encountered similar errors as well but not for using the layout
class in general...but yes I would like to know the answer to that
question as well. Not very useful when everything runs inthe IDE but it
cannot be deployed! :-)
Hiyo all!
What I like about the Design layout for building GUIs with NetBeans is
that there is also the possibility to use that AbsoluteLayout feature! :-)
That functions great on PCs where I have NetBeans installed. But if I just
want to be able to run the programm on another computer by using the .jar
java -jar JavaProject1.jar
org/netbeans/lib/awtextra/AbsoluteLayout
Does anyone have an idea what I am doing wrong? Thankx in advance!!
Regards,
Wolfgang
--
Michael D. Fecina
Research Assistant
Applied Research Laboratory
Pennsylvania State University
814.863.5248
Jon Riding
2005-04-26 21:11:15 UTC
Permalink
Sounds good, but how can this be done?

Jon R.
Post by M. Fecina
I'm pretty sure you'll need to include the AbsoluteLayout class
(and its dependents) with your jar file, unless there's a way you
can statically link it in the IDE, which pretty much does the
same thing (takes all the code necessary and builds with that as
opposed to dynamically linking at runtime (on another machine,
which doesn't have the IDE, and therefore lacks the
AbsoluteLayout class).
M. Fecina
Post by bluesun
I have encountered similar errors as well but not for using the layout
class in general...but yes I would like to know the answer to that
question as well. Not very useful when everything runs inthe IDE but it
cannot be deployed! :-)
Hiyo all!
What I like about the Design layout for building GUIs with NetBeans is
that there is also the possibility to use that AbsoluteLayout feature! :-)
That functions great on PCs where I have NetBeans installed. But if I just
want to be able to run the programm on another computer by using the .jar
java -jar JavaProject1.jar
org/netbeans/lib/awtextra/AbsoluteLayout
Does anyone have an idea what I am doing wrong? Thankx in advance!!
Regards,
Wolfgang
Wolfgang Neckel
2005-04-27 08:29:56 UTC
Permalink
Thank you for your reply! As I am a just a beginner could you please
explain how that is done? I just tried to add the Library, by
right-clicking on the project -> Properties and there under 'Running
Project' I added the Absolute Layout Library.
Sadly when trying to run the jar file as described before, I still get the
same error message (before trying, I did build the project anew).

What have I done wrong?

Thankx in advance!
Yours,
Wolfgang
Post by M. Fecina
I'm pretty sure you'll need to include the AbsoluteLayout class
(and its dependents) with your jar file, unless there's a way you
can statically link it in the IDE, which pretty much does the
same thing (takes all the code necessary and builds with that as
opposed to dynamically linking at runtime (on another machine,
which doesn't have the IDE, and therefore lacks the
AbsoluteLayout class).
M. Fecina
Vlada Djurovic
2005-04-27 09:41:23 UTC
Permalink
Post by Wolfgang Neckel
Thank you for your reply! As I am a just a beginner could you please
explain how that is done? I just tried to add the Library, by
right-clicking on the project -> Properties and there under 'Running
Project' I added the Absolute Layout Library.
Sadly when trying to run the jar file as described before, I still get the
same error message (before trying, I did build the project anew).
What have I done wrong?
I think that "Running project" refers only to running project within
NetBeans, that is, you set classpath for running you project within
NB.
If you want to use AbsoluteLayout outside NB, you can:
- edit build file to include AbsoluteLayout.jar in your distribution
(this .jar can be found in NB_HOME/ide4/modules/ext). I don't know if
there is option for this.
- copy AbsoluteLayout.jar to your JRE_HOME/lib/ext directory
vy.ho
2005-04-26 19:06:29 UTC
Permalink
What's the point of using AbsoluteLayout?

You should never use it. If you want absolute positioning, use "null"
layout (also supported in Netbeans). To convert your stuff to Null
layout, just right click on the container where the layout is concerned,
and set the layout to null.
Post by Wolfgang Neckel
Hiyo all!
What I like about the Design layout for building GUIs with NetBeans is
that there is also the possibility to use that AbsoluteLayout feature! :-)
That functions great on PCs where I have NetBeans installed. But if I just
want to be able to run the programm on another computer by using the .jar
java -jar JavaProject1.jar
org/netbeans/lib/awtextra/AbsoluteLayout
Does anyone have an idea what I am doing wrong? Thankx in advance!!
Regards,
Wolfgang
.
Lopez, Elizabeth M
2005-04-27 15:09:56 UTC
Permalink
Here's a good link that explains absoluateLayout
http://www.netbeans.org/kb/faqs/gui_editing.html#FAQ_4

If you really want to distribute AbsoluateLayout with your application,
here's another link:
http://forum.java.sun.com/thread.jspa?threadID=597783&tstart=75

-Elizabeth

-----Original Message-----
From: Wolfgang Neckel [mailto:***@xover.htu.tuwien.ac.at]
Sent: Tuesday, April 26, 2005 9:34 AM
To: ***@netbeans.org
Subject: [nbusers] absolutelayout novice question

Hiyo all!

If I may be so bold as to ask another novice question:
What I like about the Design layout for building GUIs with NetBeans is
that there is also the possibility to use that AbsoluteLayout feature!
:-)

That functions great on PCs where I have NetBeans installed. But if I
just want to be able to run the programm on another computer by using
the .jar file NetBeans build for me, I encounter the following problem:

java -jar JavaProject1.jar
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
org/netbeans/lib/awtextra/AbsoluteLayout

Does anyone have an idea what I am doing wrong? Thankx in advance!!

Regards,
Wolfgang

Loading...