About show scrollbar of the JScrollPane problem.

Hi,
JPanel main=new JPanel();
main.setLayout(null);
JPanel child=new JPanel();
child.setBounds(...,...,...,...);
main.add(child);
JScrollPane jsp=new JScrollPane();
jsp.getViewPoint().add(main);The problem is that when the child panel 's bounds is out of the visable region of the main panel ,the jscrollpane doesn't show its scrollbar.
I want show scrollbar so that I can show the invisable child panel.
How to resolve it?

Hi,
JPanel main=new JPanel();
main.setLayout(null);WRONG 1.
JPanel child=new JPanel();
child.setBounds(...,...,...,...);
main.add(child);
JScrollPane jsp=new JScrollPane();
jsp.getViewPoint().add(main);WRONG 2.
>
The problem is that when the child panel 's bounds is
out of the visable region of the main panel ,the
jscrollpane doesn't show its scrollbar.
I want show scrollbar so that I can show the
invisable child panel.
How to resolve it?WRONG 3.
You don't set preferred size for the view component.

Similar Messages

  • Can't show image in the center of the jscrollpane ,any one can help

    i write a program to show image in the jscrollpane
    i create a class called ImageLabel (it extends jlabel) then i use
    ImageLabel im=new ImageLabel(imageicon)
    jscrollpane.setViewportView(im);
    validate();
    repaint();
    but it show the image in the left and top corner of the jscrollpane ,not in the center of the jscrollpane
    then i change the ImageLabel to JLabel ,:
    JLabel im=new JLabel(imageicon);
    jscrollpane.setViewportView(im);
    validate();
    repaint();
    it shows the image in the center of the jscrollpane,
    but i want to use ImageLabel not jlabel
    whats the problem ,any one can help me ,thank you:)

    the ZoomLabel is the imagelabel ,and my complete code as follows:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    class ZoomLabel extends JLabel
        private ImageIcon icImage;   
        private int ph,pw,picW,picH;    
        ZoomLabel(ImageIcon ic)   
            super(ic, JLabel.CENTER); 
            icImage = ic;
            pw = picW = ic.getIconWidth(); 
            ph = picH = ic.getIconHeight();
           setSize(pw,ph);
           setPreferredSize(new Dimension(pw,ph));
           repaint();
          validate();
           public void zoom(float scale)    
               ph = Math.round(picH * scale);         
               pw = Math.round(picW * scale);          
               setPreferredSize(new Dimension(pw,ph)); 
               repaint();
             public void paint(Graphics g)     
                     update(g);     
                public synchronized void update(Graphics g)     
                {             g.drawImage(icImage.getImage(),0,0,pw,ph,this); 
      public class ImageShow extends JFrame
                  ImageShow()
                 ImageIcon ii=new ImageIcon("e:/download/pic/me1.JPG");
                   JScrollPane js=new JScrollPane();
                   zl=new ZoomLabel(ii);
                  js.setViewportView(zl);
                  getContentPane().add(js,"Center");
                     js.repaint();
                                  js.validate();
                  pack();
                  setVisible(true);     
             public  static void main(String[] args)
                   new ImageShow();
             ZoomLabel zl;
        }

  • I'm using ver. 3.4.5. After having a problem importing  some photo's I now have all my library showing up in the one project. I'm worried about just deleting this project in total. Any help would be appreciated

    After importing a small group of photo's I noticed that aperture didn't create a project for them as usual. The only place I could see them was in last imported. While last importwas open I selected the photo's and told aperture to creat a new project using the selected one's. I named the project with the date using all cap's so I would know which one it was.  What I have now is my whole library showing up in this one project.  If I import more pictures It does two things. A new project is created as it normally does. These new thumbnails also show up in the problem project. I tested to see what would happen if I deleted one old picture while the problem project was open. It went to the trash. It was also removed from its original project.  If I ignore this what seems to happen when importing at this time is that a new project is created that you can open, it acts normal. The file only contains the correct amount pictures.  If I then go to the problem project the thrumbnails show here also.
    About 6 mos ago I switch to Aperture from iphoto. I never combined the two libraries.  I have around twelve thousand photo's. December 1st I backed up my imac with Time Machine. I don't want to back up again until I get this problem in check.
    Thanks for any help, Dale

    Hi Andy,
    I'm using Mac OSX 10.7.5 
    No the one with the caps seems to be working normally.This project with the caps now has four files. Originally I created it with about fifteen. I deleted eleven of them and edited the remaining four. The four files each have one version and its original. It wasn't until after I completed this work that I noticed the privious project when opened and scrolled had the entire library in it.
    The test I did went like this. With the problem opened I deleted one file that I new existed prior to this problem.      I than opened that project that I new it was from to see if it got deleted and found it gone and moved to trash. I think that tells me that if I delete all the files in the problem project I'll be in trouble. I also have inported to projects each with one file that I edited. They are working fine. I took a look in the problem project and this last
    two imports show the thumdnails in it.
    Currently on my Hard Drive I have 275 GB free space.  My photo's take up 138 GB. As I said on Dec. 1st I backed up the system using time machine. So all of Dec. and part of Jan. inports won't be on it. I could work around the problem project and move those file to a safe place. I think it best not to back up the system with Time Machine until I'm confident the Aperture is runing properly. I'm happy that I control these system backups manually.
    I'll need to find out how to copy the Aperture library to another place. I'm sure I can poke around and fined out the process.
    Thanks Andy for the come back!

  • HT1386 Sry for disturbing, but i would to ask that how to overcome the problem of synchronising ? Itune showing me that the sync session is failed to start with my Ipad mini. Any ideas about what is going on ?

    Sry for disturbing, but i would to ask that how to overcome the problem of synchronising ? Itune showing me that the sync session is failed to start with my Ipad mini. Any ideas about what is going on ?

    What are you trying to sync?
    I see you are on ios 7.
    I also had upgraded my iPad Mini to ios 7 & then the 1st time I tried to open a Numbers file that was set up to sync w my MacBookPro, I got a warning that I would not be able to sync it any more w my Mac until I upgraded to Mavericks.
    So if you are trying to sync Numbers, Pages or Keynote files between your iPad mini in ios 7 and a Mac that hasn't been upgraded to Mavericks that could be the problem.
    I was very shocked to get that message since I bought Numbers on the iPad so that I could have a particular file on both devices & keep them synced. I had no clue when I upgraded to ios 7 on the iPad Mini that it would make it so the files in the iWorks apps woudln't sync any more.
    So I finally decided to go ahead & upgrade to Mavericks after carefully preparing & updating other software so that it would work w Mavericks. But I got error messages so haven't even been able to download Mavericks & now having 2nd thoughts about doing so.
    iPad mini ios 7
    MacBookPro Mid 2012 Mountain Lion
    iphone 4S ios 6

  • Upgraded one iPad to 8.1 about 10 days ago since then have to restart wireless hub each day to use, other iPad on previous os no problem until upgraded yesterday now have the same problem although both devices show wireless connection.

    we have two iPads (ipad2 and an iPad mini). The ipad 2 was upgraded to os 8.1 about 10 days ago, since then I have to restart my wireless hub every day to use the ipad. I have however been able to use the iPad mini running on the previous os without any problem. Last night I upgraded the mini to os 8.1 and this now suffers the same problem. Both iPads display a strong wireless signal to my hub but don't want to seem to connect.  I have had BT check my broadband connection and they found no problem, whatever is causing it has happened since upgrading from 8.0.2 to 8.1

    Do you have an updated version for your AirPort?

  • Is anyone else having the same authorization error when trying to view downloaded tv shows, etc. on apple tv?  I had the same problem a few weeks ago and was ultimately advised it was due to some sort of server error.

    A few weeks ago I had the same issue where items (tv shows) I purchased on itunes would not show using my apple tv on my main television.  It gives me an error stating I need to "authorize" the device/account etc.  There is no problem with the authorization it is correct; tv show plays on the computer.  The last time this happened the local apple store suggested I bring in my entire imac, hard drive, apple tv, etc.  This seemed crazy since I had been able to eliminate that there was a problem with my password, imac, etc.  I had also already tried all of the restore, reset, options to include restoring the apple tv, changing password and authorizing everything again.  Then I found out via an online discussion there were others having the same problem and it was due to some sort of server issue apple was having.  Is anyone else having this problem besides me again?

    I think I have the same problem.
    Apple TV 2. I can watch stuff I downloaded a while ago, but after I downloaded a season of a TV show on Friday night (Oct 28), I got the "Authorization Required" message. Ruined my Friday night trying to troubleshoot this, and found a bunch of posts on this forum about Apple's Servers being down can cause this. Since I'd done nothing different to my setup, I assumed that indeed "Apple's servers being down" was causing my grief.
    It's now Oct 31st, and I'm still getting the error on the newly-downloaded stuff. So either Apple's servers are having serious grief (and passing it on to me!) or else there might be something else after all.
    I've de-authorized and re-authorized my computer (I never thought for a second it would help because I can play "older stuff". Everything in my TV shows folder is bought from iTunes - i.e., it's all completely legit. We haven't even vacuumed behind the TV(!!) so we haven't disturbed anything... And the key info is that I can play stuff purchased prior to Oct 28th, but the stuff I purchased on Oct 28th hets the "Authorization required" message.
    Does anyone have any ideas?

  • I am trying to do a full Time Machine Backup to a new external disk. The backup starts, and it says "Time remaining about 4 days." That seems like a very long time, but the real problem is that the computer "logs off" after a few hours, and the b.u. stops

    I am trying to do a full Time Machine Backup to a new external disk. The backup starts, and it says "Time remaining about 4 days." That seems like a very long time, but the real problem is that the computer "logs off" after a few hours, and the backup stops. The system preferences are set to "Never" for Computer sleep and Display sleep. The computer does not ordinarily log off automatically, but it has done this twice since I started the Time Machine backup.

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the word "Starting" (without the quotes) in the String Matching text field. You should now see log messages with the words "Starting * backup," where * represents any of the words "automatic," "manual," or "standard." Note the timestamp of the last such message. Clear the text field and scroll back in the log to that time. Select the messages timestamped from then until the end of the backup, or the end of the log if that's not clear. Copy them (command-C) to the Clipboard. Paste (command-V) into a reply to this message.
    If all you see are messages that contain the word "Starting," you didn't clear the search box.
    If there are runs of repeated messages, post only one example of each. Don't post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Some personal information, such as the names of your files, may be included — anonymize before posting.

  • Hello apple I have the problem with my iPhone and my friends have this problem too. My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it bu

    Hello apple
    I have the problem with my iPhone and my friends have this problem too.
    My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it but when answer both of us can't hear anything and when I put my iPhone to my face the screen is still on and when I quit the phone application and open it again it will automatic call my recent call. And when my friends call me my iPhone didn't show anything even the missed call I'm only know that I missed the call from messages from carrier. Please check these problem I restored my iPhone for 4 time now in this week. I lived in Hatyai, Songkhla,Thailand and many people in my city have this problem.
    Who have this problem??

    Apple isnt here. this is a user based forum for technical questions. The solution is to restart, reset, and restore as new which is in the manual after that get it replaced for hard ware failure. if your within your one year warranty its replaced if it is out of the warranty then it is 199$

  • ScrollBars not showing up for the JPanel [urgent]

    Hi,
    I have a frame in which i have two nested split panes i.e one horizontal splitpane and in that i am having one more split pane on the right side and a JTree on the left side.In the second split pane (which is a vertical split) ,as a top component , i am setting a JScrollPane in which i am trying to display a JPanel which is having a lot of swing components in it.I want to see the scroll bars for this panel so that i can see all the components.Do i have to implement Scrollable interface for this panel to scroll in the ScrollPane.I don't know how to implement Scrollable interface.Can some body help me in resolving this?This is some what urgent.Any help will be highly appreciated.
    Thanks in advance.
    Ashok

    Thank you all for your replies.I added the scroll bar policy.The scroll bars are showing up but the components inside the Panel are not moving.I want the components to move when i am scrolling.Here is my code.In the code SeriesDescPanel, SeriesDescMapPanel are sub classes of JPanel.I am using null layout to add the components to these panels.
    public class MainWindow extends JFrame implements TreeExpansionListener
    public MainWindow()
    throws RemoteException
    // This code is automatically generated by Visual Cafe when you add
              // components to the visual environment. It instantiates and initializes
              // the components. To modify the code, only use code syntax that matches
              // what Visual Cafe can generate, or Visual Cafe may be unable to back
              // parse your Java file into its visual environment.
              //{{INIT_CONTROLS
              setJMenuBar(menuBar);
              setTitle("Series Maintenance");
              getContentPane().setLayout(new BorderLayout(0,0));
              setSize(667,478);
              setVisible(false);
              JSplitPane1.setDividerSize(1);
              JSplitPane1.setOneTouchExpandable(true);
              getContentPane().add(BorderLayout.CENTER, JSplitPane1);
              seriesMenu.setText("Series");
              seriesMenu.setActionCommand("Series");
              menuBar.add(seriesMenu);
              newSeriesGroupMenuItem.setText("New Series Group");
              newSeriesGroupMenuItem.setActionCommand("New Series Group");
              seriesMenu.add(newSeriesGroupMenuItem);
              newSeriesMenuItem.setText("New Series");
              newSeriesMenuItem.setActionCommand("New Series");
              seriesMenu.add(newSeriesMenuItem);
              seriesMenu.add(JSeparator1);
              serachMenuItem.setText("Search");
              serachMenuItem.setActionCommand("Search");
              seriesMenu.add(serachMenuItem);
              seriesMenu.add(JSeparator2);
              saveMenuItem.setText("Save");
              saveMenuItem.setActionCommand("Save");
              seriesMenu.add(saveMenuItem);
              seriesMenu.add(JSeparator3);
              exitMenuItem.setText("Exit");
              exitMenuItem.setActionCommand("Exit");
              seriesMenu.add(exitMenuItem);
              adminMenu.setText("Administration");
              adminMenu.setActionCommand("Administration");
              menuBar.add(adminMenu);
              bulkLoadMenuItem.setText("Bulk Load");
              bulkLoadMenuItem.setActionCommand("Bulk Load");
              adminMenu.add(bulkLoadMenuItem);
              drsMenuItem.setText("DRS override");
              drsMenuItem.setActionCommand("DRS override");
              adminMenu.add(drsMenuItem);
              helpMenu.setText("Help");
              helpMenu.setActionCommand("Help");
              menuBar.add(helpMenu);
              tutorialMenuItem.setText("Tutorial");
              tutorialMenuItem.setActionCommand("Tutorial");
              helpMenu.add(tutorialMenuItem);
              bulkLoadFormatMenuItem.setText("Bulk Load Format");
              bulkLoadFormatMenuItem.setActionCommand("Bulk Load Format");
              helpMenu.add(bulkLoadFormatMenuItem);
              aboutMenuItem.setText("About");
              aboutMenuItem.setActionCommand("About");
              helpMenu.add(aboutMenuItem);
    JSplitPane2 = new javax.swing.JSplitPane();
    upperPanel = new SeriesDescPanel();
    JScrollPane2 = new javax.swing.JScrollPane(upperPanel,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    JScrollPane3 = new javax.swing.JScrollPane();
    JSplitPane2.setOrientation(0);
    JSplitPane2.setDividerSize(1);
    JSplitPane2.setOneTouchExpandable(true);
    JSplitPane1.setRightComponent(JSplitPane2);
    JSplitPane1.setLeftComponent(viewPane);
    viewPane.add(alphabeticPane);
    viewPane.add(searchDataPane);
    viewPane.setTitleAt(0,"All");
              viewPane.setTitleAt(1,"search");
    //JScrollPane1.setMinimumSize(new Dimension(126, 478));
    JSplitPane2.setTopComponent(JScrollPane2);
    //JScrollPane2.setMinimumSize(new Dimension(426, 409));
    JSplitPane2.setBottomComponent(JScrollPane3);
    lowerPanel = new SeriesDescMapPanel();
    seriesTreeModel = new SeriesTreeModel(SeriesMaintenanceUI.getSeriesGroupInfo());
    tickersTree.setModel(seriesTreeModel);
    alphabeticPane.getViewport().setView(tickersTree);
    //JScrollPane2.getViewport().setView(upperPanel);
    //JScrollPane2.setViewportView(upperPanel);
    //upperPanel.scrollRectToVisible(new Rectangle(upperPanel.getWidth(),
    //upperPanel.getHeight(),1,1));
    JScrollPane3.getViewport().setView(lowerPanel);
    //JSplitPane2.setPreferredSize(new Dimension(426,200));
    SeriesDescPanel upperPanel;
    SeriesDescMapPanel lowerPanel;
    SeriesTreeModel seriesTreeModel;
    SeriesTreeModel searchTreeModel;
    javax.swing.JSplitPane JSplitPane2;
    javax.swing.JScrollPane JScrollPane2;
    javax.swing.JScrollPane JScrollPane3;
    javax.swing.JTree tickersTree = new javax.swing.JTree();
    javax.swing.JTree searchTree = new javax.swing.JTree();
    javax.swing.JScrollPane alphabeticPane = new javax.swing.JScrollPane();
    javax.swing.JTabbedPane viewPane = new JTabbedPane(SwingConstants.BOTTOM);
    javax.swing.JScrollPane searchDataPane = new javax.swing.JScrollPane();
    //{{DECLARE_CONTROLS
         javax.swing.JSplitPane JSplitPane1 = new javax.swing.JSplitPane();
         javax.swing.JMenuBar menuBar = new javax.swing.JMenuBar();
         javax.swing.JMenu seriesMenu = new javax.swing.JMenu();
         javax.swing.JMenuItem newSeriesGroupMenuItem = new javax.swing.JMenuItem();
         javax.swing.JMenuItem newSeriesMenuItem = new javax.swing.JMenuItem();
         javax.swing.JSeparator JSeparator1 = new javax.swing.JSeparator();
         javax.swing.JMenuItem serachMenuItem = new javax.swing.JMenuItem();
         javax.swing.JSeparator JSeparator2 = new javax.swing.JSeparator();
         javax.swing.JMenuItem saveMenuItem = new javax.swing.JMenuItem();
         javax.swing.JSeparator JSeparator3 = new javax.swing.JSeparator();
         javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
         javax.swing.JMenu adminMenu = new javax.swing.JMenu();
         javax.swing.JMenuItem bulkLoadMenuItem = new javax.swing.JMenuItem();
         javax.swing.JMenuItem drsMenuItem = new javax.swing.JMenuItem();
         javax.swing.JMenu helpMenu = new javax.swing.JMenu();
         javax.swing.JMenuItem tutorialMenuItem = new javax.swing.JMenuItem();
         javax.swing.JMenuItem bulkLoadFormatMenuItem = new javax.swing.JMenuItem();
         javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
    Pl. help me in resolving this.
    Ashok

  • Itunes will not launch, it shows  message of "itunes library .itl" can not be read because it was created by a newer version of itunes. I tried opene it in save mode but I had the same problem.

    Itunes will not launch, it shows  message of "itunes library .itl" can not be read because it was created by a newer version of itunes. I tried opene it in save mode but I had the same problem.

    If you still have an issue you may have to see about using the iTunes version (application) included with Snow Leopard 10.6 from the installer or an another one if available online, and see if that will install.
    Sometimes you may have uninstall the bits left in your system by the earlier (or later) iTunes installers; as they all leave a trace and these can stop a different version of iTunes from being installed.
    Not sure if the following site/link will tell the method...
    •Apple - Support - iTunes - install & update:
    http://www.apple.com/support/itunes/install/
    •Troubleshooting iTunes installation on Mac OS X:
    http://support.apple.com/kb/HT2311
    Good luck & happy computing!
    ps: i see you resolved this issue. it's magic!

  • Guys, my browser is going crazy and every website that I am on changes in about 10 seconds to 2 minutes to another webpage. I even downloaded a newer 5.0 version of firefox and I am having the same problem.

    Guys, my browser is going crazy and every website that I am on changes in about 10 seconds to 2 minutes to another webpage. I even downloaded a newer 5.0 version of firefox and I am having the same problem.

    Your System Details are showing Fun Web Products. Suggest you look in Add-ons - Extensions and Plug-ins, and Control Panel>Add/Remove programs or >(newer version) Programs and Features. You could also do a search of your computer.
    Fun Web Products(associated with MyWebSearch) always seems to cause problems, Alexa does, too, but less often - there may be conflicts.
    I'm not an expert on these two products. I'm afraid I can only alert you to the problems. Google will show you plenty of evidence of problems. You might also try the Search Firefox Help box above - a gold mine but it usually requires a lot of digging.
    You can start Firefox in Safe Mode - Hold Shift Key down as you double click on the Firefox icon>ignore the page that opens>Continue. If that improves things you could do a little troubleshooting(Safe Mode, Problematic extensions etc), use default theme, -
    https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    http://support.mozilla.com/en-US/kb/Troubleshooting%20plugins

  • In latest version, facing problem in downloading. Ex: If we download a PDF to open in a adobe, it is keep on showing "downloading" in the Download window.

    I updated the latest version. Yesterday I tried to download Torrent file and open using the Open or save dialogue it is not downloading fully. It is showing UNKNOW TIME REMAINING and not fully downloading. Even if i close the firefox and open it again, still it is showing the same.I thought that is is problem in my system, But all the system has the same problem. each and every 3-4 days you are relesing a version. I dont know what is there in each version..Please fix the problem. These kind of problem will make the users shift to other browsers like Chrome.

    hello saththomas, this is a bug in the latest 32 beta 9 version (please note that such issues are to be expected, when you're using beta software - for stable builds change to the firefox release channel).
    a workaround for the moment would be to enter '''about:config''' into the firefox address bar (confirm the info message in case it shows up), right-click somewhere on the page and create a new string setting with the name '''browser.safebrowsing.appRepURL''' and value '''https://sb-ssl.google<i></i>.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%'''
    for reference see [https://bugzilla.mozilla.org/show_bug.cgi?id=1057764 bug #1057764] (please don't post in bug reports, but vote for the bug if you want to see it fixed)

  • Hii i m frm BGD. I m using iphone 5. My carrier BGD ROBI AXIATA. When it was ios 6 it works better . But i recently upgrade to ios 7 and i facing the little problem. One of the ussd call. Plz help or suggest ir doing better about itz as soon as possible.

    Hii i m frm BGD. I m using iphone 5. My carrier BGD ROBI AXIATA. When it was ios 6 it works better . But i recently upgrade to ios 7 and i facing the little problem. One of the ussd call. Plz help or suggest ir doing better about itz as soon as possible.

    I'm not trying to minimize your issues, but I have an iPhone 5S and find that I have not had these types of problems on AT&T. I'm wonding if something has gotten stuck in a loop that is continually trying to use data. If you make a good backup of your phone, try restoring it as new, and do not add anything to the phone right away. Let the device run like this for a little while and see what kind of usage you have. You report you phone is showing usage of 21GB. Did you rese this setting on the phone to begin at your billing period? The reason I ask this is some people believe this setting resets on its own with your billing period, it does not. This has to be manually reset by the user, so it might not be that accurate depending on the last time that you reset it.
    If the phone seems to not use so much extra data during the period the device does not have extra apps on it, then try restoring from your backup and see what happens. If this increases your data usage quite fast again, then there is probably something corrupt in the backup that is causing this issue.

  • How to know if a scrollbar is been drawn if the JScrollPane is not visible.

    I have a JTabbedPane with one JPanel in each tab. Each of these panels contains one JLabel with a JTextBox on the top and under it the rest is filled with a JScrollPane containing a JTable. I am using a GridBagLayout.
    Now, the requirement is that the JTextBox must have the same length as the content of the JScrollPane; it means that if the JScrollPane has a vertical scroll, the JText has to be shorter on the right side by whatever the scroll width is, but if there's no vertical scroll then the JTextBox must be extended to the top of the right side.
    Now, this that looks so simple is becoming a nightmare...
    The main problem here is that this check to look if the JScrollPane has a scroll or not is done in tabs that are not visible, so i cannot use just a simple isVerticalScrollVisible() because the answer is always NO. I have been trying to catch all the events i could think may help but no luck and sometimes a refresh in one of the tabs produces the JTextField in another tab gets a wrong width.
    One posible approach is the length of the total rows of the JTable, multiply it by the row height and compare it with... with what because the scroll is not visible and the heigh is 0.
    Any ideas? Any one knows how can i know if the the silly scrollbar is visible or not in a non visible tab?
    Thanks in advance.

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • I bought two in -app purchases for 9.99$ each. they never showed up on the game, i emailed GREE, inc and they said to get a refund how do i go about this? i have the emails for proof.

    I bought two in -app purchases for 9.99$ each. they never showed up on the game, i emailed GREE, inc and they said to get a refund how do i go about this? i have the emails for proof.

    Contact iTunes Store support staff through the report a problem links in your account history or,
    iTunes Customer Service Contact - http://www.apple.com/support/itunes/contact.html > Get iTunes support via Express Lane > iTunes > iTunes Store

Maybe you are looking for

  • Logical system for CTR 5000/5300F04000 inconsistent

    How can I solve the below error: Logical system for CTR 5000/5300F04000 inconsistent Message no. KC038 Diagnosis Objekt CTR 5000/5300F04000 is assigned to logical system GC7CLNT520 but should, according to the distribution scenario you have configure

  • Why can't I use the test circuit full time????

    Just over two weeks with BT and I have to say without question the worst company I have ever dealt with. Utter utter useless at customer service and do nothing they promise, so I turn to the forum. After a week on the phone to India finally get the p

  • There is a DVD stuck in my drive on my iMac, the computer doesn't recognize it's there, how do it get it out?

    There is a DVD stuck in my drive on my iMac, the computer doesn't recognize it. How do I get it out?  I was trying to burn some photos onto it. Some error camer up, and then I coudn't get it out.

  • Trackpad will not scroll - Settings?

    I have a late 2008 MacBook. Under the last OS (Lion) and the current OS (Mountain Lion), my trackpad registers all gestures EXCEPT scrolling. After updating, the MacBook loaded an alternate account. Scrolling worked on that account! When I switched b

  • Firefox 10.0.2 fonts look weird all of a sudden

    '''twitter: ''' *notice the tweets font, it looks horrible * now: http://i41.tinypic.com/25qqkhx.png * how it should be: http://i40.tinypic.com/34xicrn.png '''youtube:''' *notice the titles font, it looks horrible * now: http://i40.tinypic.com/2n9lrt