This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to add scrolling Functionality to a JButton? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to add scrolling Functionality to a JButton?" Watch "How to add scrolling Functionality to a JButton?" New topic
Author

How to add scrolling Functionality to a JButton?

Renjith mohanan
Ranch Hand

Joined: Jun 19, 2009
Posts: 52
Hi Friends,
I am new in Swing application. I need to add scrolling functionality to JButton...

I will explain the scenario.

I have a panel with many labels. And I have two button, one for up scrolling and one for down scrolling.

What I need is, when I click on these button the panel have to scroll correspondingly (The Panel is already added to a JFrame).

Thanks in Advance..
Renjith M


Personal E-mail: kalliyoorrenjith@gmail.com
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I need to add scrolling functionality to JButton...

Why?

add the panel to a JScollpane, add the scrollpane to the frame,
then use them scrollpane's buttons for up/down
Renjith mohanan
Ranch Hand

Joined: Jun 19, 2009
Posts: 52
Thanks Michael,

I don't need to add the panel to the ScrollPane, I need to integrate the scrolling functionality to a JButton....

Thanks again Michael..
Renjith mohanan
Ranch Hand

Joined: Jun 19, 2009
Posts: 52
Renjith tvm wrote:Thanks Michael,

I don't need to add the panel to the ScrollPane.
I need to integrate the scrolling functionality to a JButton, with out using the JScrollPane class....

Thanks again Michael..
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I don't need to add the panel to the ScrollPane, I need to integrate the scrolling functionality to a JButton....

if you don't want to use the correct tool for the job, then simply reset the bounds

and if you don't know what this means, you've reached your peter principle
Renjith mohanan
Ranch Hand

Joined: Jun 19, 2009
Posts: 52
ok thanks.
 
 
subject: How to add scrolling Functionality to a JButton?
 
Similar Threads
Garbage collector question
Adding Scrolling Functionality to Button
Problem Updating a JButton
Getting reference
how to manage class relationship?