Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Newbie question re NetBeans and GUI appearance

Reply
Thread Tools

Newbie question re NetBeans and GUI appearance

 
 
MikeB
Guest
Posts: n/a
 
      01-30-2007
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

 
Reply With Quote
 
 
 
 
Ike
Guest
Posts: n/a
 
      01-30-2007
I think you need to set the size of the frame, and take into account
whatever layout manager you are using. -Ike


 
Reply With Quote
 
 
 
 
Michael
Guest
Posts: n/a
 
      01-30-2007
On Jan 30, 10:51 am, "MikeB" <(E-Mail Removed)> wrote:
> 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/tutor...g/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

 
Reply With Quote
 
MikeB
Guest
Posts: n/a
 
      01-30-2007
On Jan 30, 3:11 pm, "Michael" <(E-Mail Removed)> wrote:
> On Jan 30, 10:51 am, "MikeB" <(E-Mail Removed)> wrote:
>
> > 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/tutor...g/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


That was it! Thank you so much. It was a piece of cake to add it and
now my app looks the way I expect it to look.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby GUI under JRuby and NetBeans - A cry for help! Victor Reyes Ruby 3 06-10-2008 11:50 PM
Eclipse vs. Netbeans. Netbeans is winning me over almost at first glance. Thomas G. Marshall Java 2 10-16-2006 02:54 AM
java with native GUI appearance? nooneinparticular314159@yahoo.com Java 7 05-09-2006 03:41 PM
[NETBEANS] [EVALUATION] - E12 - The NetBeans Open Source Lie Ilias Lazaridis Java 0 12-12-2004 02:41 PM
Building a GUI using NetBeans platform (not Netbeans IDE !) Pimousse Java 2 04-21-2004 07:22 AM



Advertisments