This discussion is archived
2 Replies Latest reply: Sep 9, 2012 7:45 AM by 882099 RSS

Create a derived swing component from two or more Swing components

882099 Newbie
Currently Being Moderated
Hi,

I want to make a reusable swing component which will be composed of Jtextfield and Jbutton. On the click of the Jbutton a JFileChooser will open through which user can select a directory and the selected path will be shown in the Jtextfield.

I googled a lot but couldn't find a good article. All of the article shows extending a single Swing component but none shows how to combine two or more components into one.

Can any one please forward me an article / a tutorial /code snippet on how can I can I create a custom Swing component from two or more base Swing Component.


Thanks,
Rohit

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points