Select « Component « Java Swing Q&A





1. How can I get the background color of a selected element?    stackoverflow.com

In Swing when using a JTree/JList/JTable selecting an item changes its background color. Is there any way to retrieve this color for the current look and feel when the component is ...

2. Overlay swing components selectively?    stackoverflow.com

I just started learning swing, and couldn't find any clear instructions for this: I'd like to have a JLabel (which contains the background image) and, rendered on top of it, two ...

3. selecting Components on whiteboard    coderanch.com

Hi there, I'm trying to figure out how to solve a problem with a Whiteboard project. The program comes with several tools to use. As with any drawing app you have a toolbar with buttons that represent each tool. One for making circles, one for making rectangles, etc. One of those buttons is the SelectTool. The select tool uses mouse movements ...

4. get the selected component    coderanch.com

Hi, i would like to know, how i can get the selected taskpane, from a set of taskpanes added to a taskpane container. Actually i want to get the selected component (taskpane). Is there is some method of getting the selected taskpane, so that i can perform an action on it ? Iam implementing JXTaskPane, and created few taskpanes, added them ...