• Post Reply Bookmark Topic Watch Topic
  • New Topic

inactivate all components  RSS feed

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there a way to inactivate all components inside a panel without having to
write code to manualy disable each button
 
Ben Zung
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...without having to write code ...

How would you do anything at all without writing somce code?
JPanel's getComponents() returns an array of components that have been added to it if it helps.
 
Becki Thomas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could set a glasspane to stop mouse events getting through to the components. See this link for an example
Root Pane Example
 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cheers for that
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!