Hi everybody! Please help me to solve the problems below: #1.I want ScrollBars in a FORM(extend JFrame) which is populated with many Components.How can i do this. #2.I have made JDialog opens from a FORM(extends JFrame) through 'Findbtn'.JDialog populated with JTable has been used for fetching data from database. but the problem is how can I get text from JTable to the textfield of Form.
#1. Create an extra JPanel. Instead of adding components directly to the content pane of the frame, add them to this panel. Put this panel in a JScrollPane, and then add the JScrollPane to the content pane.
#2. There are lots of ways to do this... you can extend dialog to have methods to set each field, you can have one method that takes some kind of collection (like a hashtable) that is filled out with the data, instead of a collection, you can pass the table model and the row number you want to display... etc. There is no built in way to do this, but there are several ways to do it yourself...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com