Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

dynamically adding components  RSS feed

 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm trying a test by adding components dynamically to a GUI. In the following test I am able to add a JLabel or a JButton, but when it comes to a JTextArea nothing appears. Can someone explain what I need to do to make the JTextArea appear?

Please advise,

Alan

 
Tony Docherty
Bartender
Posts: 3205
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does work it's just that at a size of 0 x 0 there's not much to see . If you give it a size via the constructor or add some text to it, it will display something that is visible.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!