anon
anon

Reputation: 697

netBeans gui problem

I have designed this gui in netBeans which has a canvas , a couple of JtextAreas and a Jbutton. It looks great in preview, the problem is when I run the actual program the text areas are shurnk until the program prints something in them, then they expand to their full size, the Jbutton is invisible until I mouse over it then it stays visible, there is also a Jlabel which just doesnt show up in the program at all only in preview. I have designed one more program in netbeans before but did not have these problems. Any idea what I could be doing wrong?

Upvotes: 0

Views: 865

Answers (1)

camickr
camickr

Reputation: 324088

No idea whats wrong, but you should NOT be using a Canvas. That is an AWT component and you should not be using AWT components in a Swing application.

Actually the Canvas could be the problem. AWT components are painted on top of Swing components which could be causing the problem. That might be why the mouse over forces the button to show through the Canvas. I've never mixed AWT/SWING components so I don't know what wierd painting artifacts you will encounter.

Upvotes: 1

Related Questions