• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Scrolling/Scroll Bar

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Dannii Black
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dannii!
This might not be the best forum for your question. You may want to try the IDE's and other tools forum instead.
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps you're trying to figure out inter-Applet communication. The third item listed on Tony Alicea's web page is an example of inter-Applet communication.
 
Dannii Black
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
I actually figured it out in the end. Just created a scrollbar object:
JScrollBar jScrollBar1 = new JScrollBar();
And then added it in:
this.add(jScrollBar1);
Thanks anyway
reply
    Bookmark Topic Watch Topic
  • New Topic