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...

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);
  }
}









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
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
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
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
Menu Bar prob.
Menu Bar prob.  I want a menu to be displayed in each page of my swing appl. how to go abt
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
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
Bar Chart in JSP - JSP-Servlet
Bar Chart in JSP  Hi I am creating Bar chart using Jfree charts in JSP. Please advise me how to customize it. Like controlling the colors, width for each bar, showing values above the bar .  hi friend, Use
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
Address Bar
Address Bar       The address bar, originally known as URL (Universal Resources Locator) bar is a widget, which appears on the address bar beginning with http://. The http protocol
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
problem in onlinetest...
problem in onlinetest...  hi, my code getting the problem is ,when user leave a question then the server puts error... pls help me
ModuleNotFoundError: No module named 'coop-bar'
ModuleNotFoundError: No module named 'coop-bar'  Hi, My Python... 'coop-bar' How to remove the ModuleNotFoundError: No module named 'coop-bar... to install padas library. You can install coop-bar python with following
ModuleNotFoundError: No module named 'example-bar'
ModuleNotFoundError: No module named 'example-bar'  Hi, My Python... 'example-bar' How to remove the ModuleNotFoundError: No module named 'example-bar' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'process-bar'
ModuleNotFoundError: No module named 'process-bar'  Hi, My Python... 'process-bar' How to remove the ModuleNotFoundError: No module named 'process-bar' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'progress_bar'
ModuleNotFoundError: No module named 'progress_bar'  Hi, My Python... 'progress_bar' How to remove the ModuleNotFoundError: No module named 'progress_bar' error? Thanks   Hi, In your python
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
ModuleNotFoundError: No module named 'cloudmesh-bar'
ModuleNotFoundError: No module named 'cloudmesh-bar'  Hi, My... 'cloudmesh-bar' How to remove the ModuleNotFoundError: No module named 'cloudmesh-bar' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'coop-bar'
ModuleNotFoundError: No module named 'coop-bar'  Hi, My Python... 'coop-bar' How to remove the ModuleNotFoundError: No module named 'coop-bar... to install padas library. You can install coop-bar python with following
ModuleNotFoundError: No module named 'example-bar'
ModuleNotFoundError: No module named 'example-bar'  Hi, My Python... 'example-bar' How to remove the ModuleNotFoundError: No module named 'example-bar' error? Thanks   Hi, In your python environment
Progress Bar in Java
Progress Bar in Java       Progress Bar is a component used to show the status of the application... application. In Java Progress Bar is created using swing. The Swing Class used
Bar chart with J table
Bar chart with J table  Hi I'm new in Java and I have a application... tell me how can I make a bar graph that will display the data from my table.I tried using the code from your page (http://www.roseindia.net/chartgraphs/bar
Progress Bar - Swing AWT
Progress Bar  Hey if possible plz help me in making the following program work... i m using threads in order to make the progress bar auto increment..." is for manual updation of progress bar.. import java.awt.*; import javax.swing.
problem in validation
problem in validation  sir/madam, i m using struts-1.3.10. i m getting a problem my properties file is not found.... while i hav configuired it in struts-config.xml file, likeADS_TO_REPLACE_1 thanks n regards himanshu
javascript problem
javascript problem  hi guys My problem is that I am using radio button for yes or no but i want to do that if I press yes button then enter... enter please help me this problem
Bar Chart
Bar Chart       In this section we are providing you an example to create a Bar Chart. Description of Program  For creating a Bar chart we use the object
problem on strings
problem on strings  in string1 "123456 ABC DEF...",IN string2 "raveen". iwant to add string2 after 123456 in the first string based on index number.i need logic for this with out using StringBuffer concept. Thanks in advanace
Problem with loginbean.jsp
Problem with loginbean.jsp  http://www.roseindia.net/jsp/loginbean.shtml - I am getting an error in loginbean.jsp.There is some error regarding .What is hello in this? Also in this example how
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot... havenot set the build path.if this is the problem then tell me how to set

Ads