Main problem here - that you create your class extending JFrame, but you never add any components to the instance of THIS class. Besides you add all the components to the frame that is created in the getJFrame method, which is never called in your code.

But it's NOT appropriate in this context, because you don't really EXTEND JFrame class (you even don't need to write "extends JFrame" in declaration). You just create some GUICreator class that constructs and fill JFrame instance in getJFrame method.

Nicol Green

Ranch Hand

Posts: 66

posted 9 years ago

Hi Sveta!

Now I see where is the problem! Thank you for quick response!

I haven't use Visual Editor before, so I assumed that "all is included"

Nicol Green

Ranch Hand

Posts: 66

posted 9 years ago

I tried to replace that code with constructor, but it says "The methods setTitle, setSize and setContentPane are undefined for type MyFrame."

I thought it is bad practice to mix components from Visual Editor and components programme ?