Java look and feel at runtime different from jFrame preview (NetBeans)

321 Views Asked by At

I am curious as to which I should trust what would best represent my code at runtime. For example, when I build and run the application, I get the following: Compiled version

However, when I right click on my jFrame, and click on preview, I get what I actually "wanted" (I realize the menuBar is missing): Second image

It's strange, because going into the Properties of the jPanel (which has the BorderedLayout manager and contains the jDesktopPane), and setting the preferred size or the size itself will actually 'refresh' and display accordingly whereas when I compiled and ran the program, no changes were visible.

So which should I trust?

0

There are 0 best solutions below