netBeans gui problem

后端 未结 1 1814
灰色年华
灰色年华 2021-01-28 14:39

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

相关标签:
1条回答
  • 2021-01-28 15:06

    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.

    0 讨论(0)
提交回复
热议问题