user3015531
user3015531

Reputation: 31

preview GUI in NetBeans while using code to build GUI

How do you view a JFrame GUI design if you build your frame in code from a constructor?

(There is no design preview if you create object or extend from JFrame?)

I want to create a GUI by writing Java code so that I can learn more about Java GUI concepts, but it is annoying to have to run app every 5 sec to see how my buttons fit.

Upvotes: 2

Views: 153

Answers (1)

jaco0646
jaco0646

Reputation: 17164

Previewing a Swing GUI in NetBeans requires the auto-generated *.form (xml) file which corresponds to the code. If you write the code by hand, you will not have the necessary xml metadata to preview it.

Upvotes: 1

Related Questions