JScroll Bar Problem

Ads
 

JScroll Bar Problem

Hello sir , Can't we add JScrollBar directly to JFrame only by adding some buttons so that we can scroll and see these buttons... please provide me simple example but without adding JPanel to to JFrame...

View Answers

July 1, 2011 at 3:23 PM

import java.awt.*;
import javax.swing.*;

public class AddScrollBarToJFrame {
  public static void main(String args[]) {
    JScrollBar bar1 = new JScrollBar(JScrollBar.HORIZONTAL);
    JScrollBar bar2 = new JScrollBar(JScrollBar.VERTICAL);
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container contentPane = frame.getContentPane();
    contentPane.add(bar1, BorderLayout.SOUTH);
    contentPane.add(bar2, BorderLayout.EAST);
    frame.setSize(300, 150);
    frame.setVisible(true);
  }
}

Ads









Related Tutorials/Questions & Answers:
JScroll Bar Problem
JScroll Bar Problem  Hello sir , Can't we add JScrollBar directly to JFrame only by adding some buttons so that we can scroll and see these buttons... please provide me simple example but without adding JPanel to to JFrame
ModuleNotFoundError: No module named 'django-jscroll'
ModuleNotFoundError: No module named 'django-jscroll'  Hi, My... named 'django-jscroll' How to remove the ModuleNotFoundError: No module named 'django-jscroll' error? Thanks   Hi, In your python
Advertisements
java gui-with jscroll pane
java gui-with jscroll pane  Dear friends.. I have a doubt in my gui application. I developed 1 application. In this application is 1 Jscrollpane of height 600 and width 400. Normally it is showing 200 height and 400 width
java gui-with jscroll pane
java gui-with jscroll pane  Dear friends.. I have a doubt in my gui application. I developed 1 application. In this application is 1 Jscrollpane of height 600 and width 400. Normally it is showing 200 height and 400 width
Bar graph
Bar graph  How to include a bar chart in iPhone sdk
bar chart
bar chart  how to create a bar chart from values of the database and the string value should be the entities of the database??plzz help..needed badly
Bar Chart
Bar Chart  hi...... Thanks 4 ur help for the bar graph creation i have got what i wanted. But now want to ask that in that bar graph i want multiple bar on one value means I want to create a graph where on my x-axis i have
Progress Bar
Progress Bar  Hi friend, I'm interested in knowing how to progress bar in oracle forms 9i for the trigger when-button-pressed.Thankyou. Thanks and Regards, M.SHANKAR
progress bar
progress bar  Hi guys, I'm doing a file upload in spring MVC technology. For file upload i did validation in client side.While uploading how to use an ajax function to show the progress bar
Bar chart implementation in PHP
Bar chart implementation in PHP  How to implements reports in bar graphs by using PHP
ModuleNotFoundError: No module named 'bar'
ModuleNotFoundError: No module named 'bar'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bar' How to remove the ModuleNotFoundError: No module named 'bar' error
Removing the Title Bar of a JFrame
Removing the Title Bar of a JFrame  How to remove the Title Bar of a JFrame in Swing Application?   Please check the tutorial Removing the Title Bar of a Frame for the source code and example description. Thanks
Bar charts and jsp
Bar charts and jsp  Hi, How to generate Dynamic Bar Chart Images using jsp with placing any image location in weebroots? Thanks in advance
custom navigation bar in iphone
custom navigation bar in iphone  How can i create a custom navigation bar in iPhone application? I wanted to add UIBarButton items as well as Search bar on the UINavigation controller ... please tell me if i need to create
UINavigationController hide navigation bar
UINavigationController hide navigation bar  HI, How to hide the navigation bar of UINavigationController? I have to hide navigation bar... code for hiding UINavigationController's navigation bar
struts collection problem in Mozilla
struts collection problem in Mozilla   I used the to get list of records, if records are more than 15-20 then this is not seen properly with vertical scroll bar on Mozilla. Plz help me
datewise/monthwise bar graph
datewise/monthwise bar graph  How to make a datewise/monthwise bar graph using the values from the ms access database? please help its urgent
Stacked Bar Chart
Stacked Bar Chart  How to display a stacked bar chart using java from the values stored in the ms access database?Plzz help..its urgent
Iphone Tab Bar Controller
Iphone Tab Bar Controller  Hi, I am very new in mobile application programming. So, how can i create iphone tab bar controller apps. Please suggest me any online help, so that i will enhance my technical skill in mobile web
java bar charts and jsp
java bar charts and jsp  Hi, Can any one help me out in how to create java bar charts using jsp with the help of data base table values? thanks in advance   Have a look at the given link: http://www.roseindia.net
Horizontal scroll bar?
Horizontal scroll bar?  Hi all, I have a HTTP Servlet... this. While the browser window automatically creates a vertical scroll bar, it does not automatically create a horizontal scroll bar when the data written exceeds
Menu Bar prob.
Menu Bar prob.  I want a menu to be displayed in each page of my swing appl. how to go abt
Create Bar graph
Create Bar graph  hi............. In my project i want to create a BAR GRAPH to display the result. I HAVE certain values that want to show in graph form. Can u help me plzzzzzzz i require a very simple code in java swings were
iphone tab bar
iphone tab bar  how to add tab bar items dynamically in iphone...; the answer you provided is just the basic of tab bar control,i want dynamic tab bar items from xml files
ios hide status bar
ios hide status bar  HI, I am developing an application in IOS. Can anyone tell me how to? hide status bar? Thanks   Hi, Following code can be used: [[UIApplication sharedApplication] setStatusBarHidden:YES
To display the bar graph
To display the bar graph  hi........ I am able to get the output of bar graph. but now i want that to be displayed on my own form. The code which i am having in that the output is displayed in another form, its creating new form
hide the url in address bar
hide the url in address bar  how i can hide url in address bar????? i have lot of jsp pages when i call one jsp in address another jsp page name also displayed in the address bar? url not visible to endusers please tell me any
AJAX Rating Bar
AJAX Rating Bar       This is a rating bar script done with PHP and mySQL that allows users to rate things like can be done on Netflix or Amazon, all web 2.0-like with no page refresh
How to design a bar code, design a bar code, bar code
How to design a bar code       This tutorial will teach you to design a bar code, the bar code used on every product so I thought to make about this design.  Let's
ModuleNotFoundError: No module named 'bar-chooser'
ModuleNotFoundError: No module named 'bar-chooser'  Hi, My Python... 'bar-chooser' How to remove the ModuleNotFoundError: No module named 'bar-chooser' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'blackhc.progress-bar'
ModuleNotFoundError: No module named 'blackhc.progress-bar'  Hi...: No module named 'blackhc.progress-bar' How to remove the ModuleNotFoundError: No module named 'blackhc.progress-bar' error? Thanks   Hi

Ads