• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextField problem  RSS feed

 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have JPanels (tabs) inside a JTabbedPane. Components in the JPanels like JTextField, JRadioButton,JCheckBox are dynamically generated. When I click on a tab, most of the times ONLY the JTextField component becomes non-editable. When I do ALT+TAB, it becomed editable. Other Components (JRadioButton, jCheckBox) in the same Tab are working fine. I tried calling repaint() and revalidate() after adding the components to the JPanel.No use.
Any help would be greately appreciated.
Thanks
Sri
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be of some help if you could post the relevant parts of your code.
are you setting the JTextFields to non-editable somewhere. should they be non-editable?
it might help to call the methods doing the layouting inside SwingUtilities.invokeLater. (although sometimes it makes things worse, you'll have to try.)
but: paste some code, it sounds more like a bug.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!