This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes scrolling standalone app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "scrolling standalone app" Watch "scrolling standalone app" New topic
Author

scrolling standalone app

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
when working in a web app its easy: you keep adding forms, textareas and so on so the webpage has to scroll.
My Q: is this possible with a standalone app?
i asked because someone showed me one, made in java, where there are several checkboxes, textfields and so on and all this scrolls!!(inside the app)
i tried adding a jscrollpane to my app and then add several components to it but it didnt work.
How can one do it?
thanks in advance
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

A scroll pane scrolls a single component. You should add your components to a single container (Box, JPanel) and create a JScrollPane instance with it. Take a look at the Java Tutorial on Scroll Panes for more info.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
hi
thanks for your answer!

i made this:


but it doesnt show up when i run it
What am i doing wrong?
thanks in advance
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Are you adding that JScrollPane to some top-level container, like a JFrame?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...
[ June 14, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: scrolling standalone app
 
Similar Threads
java.lang.NoClassDefFoundError Using eclipse
scrolling standalone app
packaging
could not find the main class
Java Application and Web Application communication