Display Vertical scroll bar by default

I am not getting vertical scrollbar in JEditorPane.Here a sample Code.
TRy to replace the image with available image of size greater than 800*400.(so that you will get a scrollbar).
After running this code you will find that horizantal scrollbar appears but vertical scroll will not appear.why so.Please some one help me out!!!!.
Here the sample code:
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
public class ScrollPaneDemo extends JFrame
JEditorPane pane=new JEditorPane();
public ScrollPaneDemo() {
super("JScrollPane Demo");
addWindowListener(new WindowAdapter( ) {
public void windowClosing(WindowEvent e) { System.exit(0); }
pane.setLayout(null);
ImageIcon ii = new ImageIcon("E:\\images\\PONSLETTER.gif");
JLabel lab=new JLabel();
lab.setIcon(ii);
lab.setBounds(0,0,ii.getIconWidth(),ii.getIconHeight());
pane.setSize(300,300);
pane.add(lab);
JScrollPane jsp = new JScrollPane(pane);
jsp.setBounds(0,0,200,200);
getContentPane().setLayout(null);
getContentPane().add(jsp);
setSize(500,500);
setVisible(true);
public static void main(String[] args) {
new ScrollPaneDemo();

Hi Geetha,
Here's the code.
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
public class ScrollPaneDemo extends JFrame
JEditorPane pane=new JEditorPane();
public ScrollPaneDemo() {
super("JScrollPane Demo");
addWindowListener(new WindowAdapter( ) {
public void windowClosing(WindowEvent e) { System.exit(0); }
pane.setLayout(null);
ImageIcon ii = new ImageIcon("E:\\images\\PONSLETTER.gif");
JLabel lab=new JLabel();
lab.setIcon(ii);
lab.setBounds(0,0,ii.getIconWidth(),ii.getIconHeight());
pane.setSize(300,300);
pane.add(lab);
JScrollPane jsp = new JScrollPane(pane,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
jsp.setBounds(0,0,200,200);
getContentPane().setLayout(null);
getContentPane().add(jsp);
setSize(500,500);
setVisible(true);
public static void main(String[] args) {
new ScrollPaneDemo();
Cheers :)
Nagaraj

Similar Messages

  • Vertical Scroll Bar on the device display

    Hello,
    I had the problem with both horizontal and vertical scroll bars. Managed to get rid of the horizontal scroll bas using the parameters ~itsmobileelemfactor and ~itsmobileelemunits but the vertical scroll bar is still there. As our transactions are developed internally, I managed to sqeeze the screen elements but still the vertical scroll bars are there.
    I am testing with Intermec CK3 device with Intermec Browser.
    I was going thru this forum and someone has suggested to modify the CSS.
    Can someone help me which html parameters are required and under which css class e.g. font size, line-height etc to reduce the overall screen size? I am not good in HTML.
    Thanks in advance.
    Regards
    Narottam

    Hi Oisin,
    Parameters in SE80:
    ~GENERATEDYNPRO = 1
    ~ITSMOBILE = 1
    ~SOURCES = ZZITS_IB_LM00,ITSMOBILE01,ITSMOBILE
    ~THEME = 99
    ~TRANSACTION = LM01
    Parameters in SICF:
    ~ITSMOBILE = 1
    ~TRANSACTION = LM01
    ~THEME = 99
    ~SOURCES = ZZITS_IB_LM00, ITSMOBILE01,ITSMOBILE
    ~POPUPS = 1
    ~WEBTRANSACTIONTYPE = EWT
    ~ITSMOBILEDEVICEINCLUDE = ZZ_IBROWSE
    ~ITSMOBILEELEMFACTOR = 8
    ~ITSMOBILEELEMUNIT = px
    I know you helped me earlier and provided two OSS notes. Those nores are installed.
    Again, please let me know what I am missing to get rid of the vertical scroll bar. Strictly we have followed 16X20 screen size which is SAP RF standard.
    Regards
    Narottam

  • Question on vertical scroll bars in JScroll Pane

    Hi,
    I managed to display my chat program with a vertical scroll bars by using JScrollPane. Every time some on types a line, this is appended to whatever was previously in the JTextArea (the JScrollPane has a JTextArea in it). Even though this works fine, when the dimension of the JTextArea is full with text, one has to scroll down to see what was the last line of text that was typed.
    Is there a way to make the verticall scroll area alwas scrolled down (I mean, scrolled to the bottom so I can see new incoming text without manually having to scroll it down?)
    Thanks!
    Cecilia.

    You might try adding a properties listener to the JTextArea listening for a "resize/size" property change and when it does, force the scroll bar to go to max.

  • Vertical Scroll bars in analysis - View all rows

    Users want to see the whole report displayed in one page with only a vertical scroll bar. They do not want the up/down arrows. Is this possible in OBIEE?
    Thanks.
    Ad

    To implement the solution, please do:
    1. Change instanceconfig.xml file in <biee11g_install>\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1 as following
    <Views>
    <Pivot>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDownload>2500</DefaultRowsDisplayedInDownload>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DisableAutoPreview>false</DisableAutoPreview>
    <MaxVisibleColumns>5000</MaxVisibleColumns>
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>500000</MaxVisibleRows>
    <MaxVisibleSections>5000</MaxVisibleSections>
    </Pivot>
    <Table>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
    <DefaultRowsDisplayedInDownload>2500</DefaultRowsDisplayedInDownload>
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>500000</MaxVisibleRows>
    <MaxVisibleSections>5000</MaxVisibleSections>
    </Table>
    </Views>
    3. Note the new elements added are the following to both <Pivot> and <Table>, the Pivot part controls Pivot view, and Table part controls Table View, my testing was done with Table View.
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>500000</MaxVisibleRows>
    <MaxVisibleSections>5000</MaxVisibleSections>
    4. Restart Presentation Server from EM, then run your request, do excel export to verify.
    Thanks...

  • TileList does not recognize the size of vertical Scroll Bar

    Hi,
          I have a tileList with a custom vertical scroll bar that I made, the problem is that when the tilelist gets filled, it does not recognize that the vertical scroll bar width is not the default 16 pixels (I think the default value it's 16, but I'm not really sure) but 5 or 6 pixels, so the first time it gets filled it shows 3 columns of items (no problems with the rows). The columnWidth is set to 185, if I lower it to 180, it shows the 4 columns that I want it to show (instead of 3). I know that there is enough space because when I scroll down, and then scroll up, the fourth column appears. That's why I think that the TileList is not recognizing that the width of the vertical scroll Bar is less than the default width.
    Does anybody know how to make it recognize the new width? And how is  it that it has to take a scroll down to get it to recognize it.
    Thank you for your help.
    Sebasti'an Toro O.

    Yeah, you can try signing up for DropBox - it's a free service that allows you to sync any files between your iPhone and your computer.  More info here:  http://www.dropbox.com/about

  • How to fix double vertical scroll bar in responsive output

    After implementing the solution provided for the question 'Responsive HTML5 Output: How to auto adjust the screen resolution for all devices?', the function bar in output does not appear and also another vertical scroll bar in the output. I edited the max-width value in the layoutfix.min.css file and fixed the function bar issue. How can I do away with the additional vertical scroll bar?

    I've looked into the issue.
    @Delennish: In your case, the size of the iframe is too large, or you have an extra empty element below the iframe. You can try 2 things:
    1. Best solution but may have side effects: In the main.css, add the following code:
    div.contentholder { overflow: hidden !important;}
    For this option, please check for undesired side effects.
    2. Works, but is ugly: In the main.css, add the following code:
    div.floatholder iframe.wTopic { height: 95% !important;}
    Try playing with the height setting until the 2nd scrollbar disappears.
    @CarolW: The layout you're using is very old. I've made a new responsive layout with TOC only. Please use that one instead: http://www.wvanweelden.eu/sites/default/files/attachments/Theme1_Standard_TOC_Only.zip (I'll update my site with this new version later.)

  • Vertical scroll bar on tab page.

    Hello,
    I have to show vertical scrollbar on my tab canvas.
    I have one Content canvas on which I have 1 tab canvas with 8 tab pages.(sec1,sec2,sec3 ..sec8)
    I have another tab canvas(kind of seb section for the above and each has 3 tab pages) like
    Sec1 will have (sub sectiion tab canvas) which has again 3 tab pages 1.1,1.2,1.3 and soon
    now on the third tab page of the sub section or second tab canvas, I need vertical scroll bar to fit number of fields which are more than the tab canvas size.
    all are from the same data block
    Could you please help me. i tried by creating staked canvas but no luck.
    can you please let me know the procedure to be followed
    Thank you in advance.

    Could you please help me. i tried by creating staked canvas but no luck.What happened when you tried to use a stacked canvas?
    If the items in the area you want to scroll are all in the same datablock you can set the Scrollbar properties of the block to be displayed. This will enable scrolling of the items that are within the specific block. If you items are assembled from more than block, then using a stacked canvas is a better option for enabling scrolling within an area.
    Also, what is your Forms version?
    Craig...

  • Vertical scroll bar for the table

    Hi,
    I have a table which will contain more than 100 rows. First Visible rows will be 10.
    i want a vertical scroll bar for the table, so that i can see all the rows using vertical scroll bar. While scrolling down, the header row, which contain names of the column should be static (ie visible even scroll down) and the footer of the table should be visible even goes up.
    If I use Scroll container, it will take whole table and the header row, row with name of column will move up invisible when i scroll down. So it is not useful if i use scroll contatiner.
    I need a fnctionality were table has a vertical scroll bar to it.
    Thanks
    Maha

    Hi,
    Your requirement is one of the default properties of the Table UI element in NWDS CE version.
    Regards,
    Alka.

  • Keep vertical scroll bar still y JScrollPane

    Hello all!
    I have got a JTable added into a JScrollPane, which scroll bars are always shown.
    I have to repaint the JTable each 3 seconds and I would like to keep the vertical scroll bar in its original position, for example if I am watching row 24 of the JTable when the JTable is repainted I would like the vertical scroll bar to be in the same position as it was before repainting because now the vertical scroll bar is repainted always at the top...
    With the horizontal bar it works, the bar does not move from its previous state when the JTable is repainted...
    Any idea of what is happening?
    Thanks in advance :)

    This would do for u! ... do it after you have updated the table with the new rows... if you are not using the default table model then you can still get the row count through your JTable object ...
    This part moves the scrollbar to the last row coz im doing "myDefaultTableModel.getRowCount()-1", you can keep the current row index in an instance level variable bjust before refreshing the table and use it in this.setRowSelectionInterval() method ...
    this.setRowSelectionInterval(myDefaultTableModel.getRowCount()-1, myDefaultTableModel.getRowCount()-1);
    this.setColumnSelectionInterval(1, 1); //didnt need any specific column coz I wanted the row basically..
    this.scrollRectToVisible(this.getCellRect(this.getSelectedRow(), 1, true));This basically selects the given row and then moved the scrollbar over to that point as well ...
    OR, here's another alternative!! you can also get the current scrollbar value similarly jsut before refreshing and pass that on to this method ...
    this.jScrollPane1.getVerticalScrollBar().setValue(jScrollPane1.getVerticalScrollBar().getValue());Hope it helps...
    Cheers!
    Asim

  • No vertical scroll bar using Safari or Firfox

    I created my own website using Dreamweaver CS3 and it looks great using IE. I just viewed it in Safari and Firefox and noticed there is no vertical scroll bar on the right so people can not see the bottom half of my pages. I have researched this online and nothing seems to be working. Any ideas will help. My website is www.binglevet.com if that helps anyone view the source code. Thank you. Caroline

    You are awesome! I actually did run that report and there was this message; however, I didn't realize it was the main cause for many to be unable to view my site when using Firefox or Safari. I deleted the line and it now scrolls in both browsers. Thank you for the help.
    Unsupported value: 'fixed'
    body  {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    background: #2A1F55;
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
    position: fixed;

  • Vertical scroll bar disappeared

    Vertical scroll bar gone--most annoying when trying to use my google calendar. I read the help responses and couldn't figure out what to do.

    This issue can be caused by the Babylon Toolbar extension
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Freeze column headers in a table and enable vertical scroll bar on the rows

    I have seen demos of BI Publisher running an html view of a report that displays a table of data with a vertical scroll bar on the table. The table header is always visible as you scroll down on the rows of the table. Any idea how this is achievable?

    Hi,
    Have you find a way to do this? Im looking for the exact same thing!
    Where did you see this demo?
    Br
    Magnus

  • Missing (Functional) Vertical Scroll Bars In IE 11.0 After Upgrade

    We are in the process of upgrading our SharePoint 2010 Farm to SharePoint 2013.  We have begun our database-attach upgrade and have not yet converted the "look and feel".  (The SharePoint 2013 farm has the latest patches and fixes)
    The sites have no customizations or custom code.  Under SharePoint 2010 farm the sites render correctly in Internet Explorer 11.0, Chrome, etc.  The migrated sites do not show the vertical scroll bars in Internet Explorer 11.0, but show correctly
    in Chrome (Version 39.0).  Both the original farm and new farm are using the default unmodified v4.master page.
    I have tried searching in the forums for an answer and on the internet and I see references to .css and .js settings.  I don't know if that is the issue.
    Oh and we have tried the compatibility settings but they did not make any difference.
    Any thoughts?

    Hi Roger,
    I recommend to verify the things below: 
    Please reset IIS and check if there is any application pool is not start in IIS.
    Would you please capture the screenshot about missing Vertical Scroll Bars and let me know the URL address.
    Also, please collect ULS log for further research:
    Collect the ULS log:
    •Enable Verbose logging via Central Admin> Monitoring> Reporting>Configure diagnostic logging(You can simply set all the categories with Verbose level and I can filter myself).
    •Reproduce the issue for three times.
    •Record the time and get a capture of the error message(including the correlation ID if there is). Collect the log file which is by default located in the folder:  <C:\Program files\common files\Microsoft Shared\web server extensions\15\LOGS>. Compress
    them to a zip file and send it to me via workspace
    •Stop verbose logging.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Vertical scroll bars update?

    I have a VI that I want to update the vertical scroll bars after the table has enough data that the scroll bars can be used. By default as far as I can tell the data in the table does not cause the scroll bars to move automatically to show the latest data in the table. I came up with a way to do it but was wondering if there is a better way of doing it. The VI that I came up with is attached. Let me know if there any any other ideas with this.
    Thanks,
    Troy
    Attachments:
    Vertical_Scroll_Bar_Update.vi ‏56 KB

    You could do it this way as well, which does not mean that this solution is better. Just another way to do the same.
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Vertical_Scroll_Bar_Update.vi ‏58 KB

  • Is there a way to hide the horizontal and vertical scroll bar?

    Hi,
    I have report with customized page height and width and I am displaying it in the windows forms.
    When I am resizing the form wherein the crviewer is dock in, the horizontal and vertical scroll bars appears.
    Is there a way for me to suppress the those scrollbars?
    Thanks in advance.

    Couple of ways I've been able to find info about. E.g.; there is not straight API off os the viewer (CRviewer.ScrollBar = False ).
    1)  Add Panel control onto the page and add report viewer control into a Panel. Set Scrollbar, width, height property of Panel control.
    2) See http://www.dotnetspider.com/forum/266932-Remove-Scrollbar-from-Crystal-report-Viewer.aspx for another idea.
    If either of the above works for you, please let us know as I have not tested this yet.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Maybe you are looking for

  • Can't figure out what the problem is, please help!

    Hey, so I have a Mac Mini which I bought nearly 3 years ago. I've been running the latest system 10.6.6, when the issues started. Everything would just unexpectedly quit and occasionally, I'd get the "You need to re-start your computer..." grey scree

  • Dml error logging  - are exceptions redundant?

    Hi there Heard alot about dml error logging and looks good in practice. In a data warehouse environment and wish to make use of this in a pl/sql procedure - I'm thinking is the only exception I would neeed know something like when others then insert

  • Media manager adding frames

    i'm trying to export 4 layers of video (rough composite layer, blue screen layer, matte layer and background layer) with media manager. i need to send these shots to compositors to make the final composites. i'm using media manager because it seems l

  • Jumping to a transaction from report not executing

    After running a query, in the report, we right click on a value to go to the context menu; which in turn should take me to a transaction GD13,as specified in the RSBBS transaction. But this is not happening. And, i get an error- 'Jump target can not

  • Multi-IP Question

    I was reading somewhere in the documentation that in liu of setting up a           proxy or DNS round robin, you could reference the cluster using an IP           address that included the IPs of the individual servers. I realize this           would