Newbie question re NetBeans and GUI appearance

M

MikeB

I apologize. I expect this is the wrong forum to ask my question and
would appreciate a hint as to the appropriate forum to ask this
question in.

On the off chance that someone will answer, I will put my question
here as well.

I'm a student at university and we have to develop a GUI program with
NetBeans. I have managed to complete the layout of my frame and all
the components appear. However, the appearance is different depending
on how I display the frame. If, while in the IDE, I click on the
"Preview Design" icon, I see the frame rendered so that it looks
exactly like any other windows window on my computer. If I choose to
Run the application, I get a clunky, less nice appearance of the
window.

Can anyone point me to what/where I need to change things so the run-
time window is as nice-looking as the design-time window?

Thanks.
Mike
 
I

Ike

I think you need to set the size of the frame, and take into account
whatever layout manager you are using. -Ike
 
M

Michael

I'm a student at university and we have to develop a GUI program with
NetBeans. I have managed to complete the layout of my frame and all
the components appear. However, the appearance is different depending
on how I display the frame. If, while in the IDE, I click on the
"Preview Design" icon, I see the frame rendered so that it looks
exactly like any other windows window on my computer. If I choose to
Run the application, I get a clunky, less nice appearance of the
window.

It sounds like you need to set the look and feel:
http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/
plaf.html
Basically, you'll need to add code as shown to your main function (or
some other such place). Presumably NetBeans is automatically doing
that in Preview Design mode.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,368
Latest member
EwanMacvit

Latest Threads

Top