Hi, I've created an applet which gets results from a database. My problem is that I want to show this results in a seperate frame which should have a scrollbar so that all the results can be seen in the one frame. Can you help me out please? :-) Thanks
Joined: Apr 23, 2003
Whoops, forgot to mention a couple of things. I'm using JBuilder 3.5 and also, I don't want to drag and drop the scrollbar, I want to write it up in the code as this is how the rest of my design was created.
I'm a bit confused: Are you asking to create and display the data in a HTML frame that is seperate from your applet, or you want to add scrolling functionality to a Panel within your applet? I'm not quite sure how to transfer the data from the applet to the rest of the HTML page to do the former (I'd use JSP/Servlets to do that....), but the latter is simple. Generic instructions: Add a JScrollPane to your applet using: new JSCrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); Add a JPanel.JTable to the JScroll Pane Set the size of the JPanel/JTable to whatever size you need.
Hope that this helps
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.