Jtable inside a JscrollPane - Can't see the left hand side of my Jtable (th

Jtable inside a JscrollPane - Can't see the left hand side of my Jtable (the border)from some reason - please help. This is my code:
public class RecordSetPanel extends JPanel {
private JTable rsTable;
private JScrollPane tableScrollPane;
public RecordSetPanel() {
setLayout(new BorderLayout());
rsTable = new JTable();
rsTable.setBackground(getBackground());
rsTable.setRowHeight(25);
rsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
tableScrollPane = new JScrollPane(rsTable) {
public Insets getInsets() {
return new Insets(20, 20, 20, 20);
tableScrollPane.setBorder(BorderFactory.createLineBorder(getBackground()));
add(tableScrollPane, BorderLayout.CENTER);

I've tested this code and it looks fine:
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class Dialog1
    extends JDialog {
  JPanel panel1 = new JPanel();
  BorderLayout borderLayout1 = new BorderLayout();
  public Dialog1(Frame frame, String title, boolean modal) {
    super(frame, title, modal);
    try {
      jbInit();
      pack();
    catch (Exception ex) {
      ex.printStackTrace();
  public Dialog1() {
    this(null, "", false);
  public static void main(String args[]) {
    new Dialog1().show();
  private void jbInit() throws Exception {
    panel1.setLayout(borderLayout1);
    panel1.add(new RecordSetPanel(), BorderLayout.CENTER);
    getContentPane().add(panel1);
  public class RecordSetPanel
      extends JPanel {
    private JTable rsTable;
    private JScrollPane tableScrollPane;
    public RecordSetPanel() {
      setLayout(new BorderLayout());
      TableModel dataModel = new AbstractTableModel() {
        public int getColumnCount() {
          return 10;
        public int getRowCount() {
          return 10;
        public Object getValueAt(int row, int col) {
          return new Integer(row * col);
      rsTable = new JTable(dataModel);
//      rsTable.setBackground(getBackground());
      rsTable.setRowHeight(25);
      rsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
//      tableScrollPane = new JScrollPane(rsTable) {
//        public Insets getInsets() {
//          return new Insets(20, 20, 20, 20);
//      tableScrollPane.setBorder(BorderFactory.createLineBorder(getBackground()));
      add(new JScrollPane(rsTable), BorderLayout.CENTER);
}

Similar Messages

  • HT1399 I just downloaded the newest version of itunes, and when I connect my ipod nano (3rd gen), I can no longer see my playlists (on the left hand side). I hate the new format...any way to revert back to the old one?

    I just downloaded the newest versionof itunes. Now when I plug in my ipod, I can no longer see my playlists (listed on the left hand side). The new format is very confusing! How do I drag and drop songs into specific playlists I have?  Is there a way to revert back to the old itunes?

    I had the same question. Someone answered perfectly here post https://discussions.apple.com/message/20575126#20575126
    The answer was click View > Show sidebar. Devices and playlists will display in the left sidebar once again.

  • HT1222 How in the **** am I to get to the next email that I don't want to delete or put somewhere I can't see my email list on the left hand side??

    HHow in the **** am I supposed to read my next email when I don't want to put my previous one. Somewhere and why can't I see on the left hand side all my emails for viewing I don't want to receive some and delete ASAP but all I getting is a full view of the next one

    If you're talking about the built-in Mail on the ipad - you will always see the mailbox list in landscape view (ie turn your ipad sideways). In portrait view, you should be able to see the Inbox link at the top left of the screen if it's hidden.
    Matt

  • I can't see the left column of the screen, I can't see the left column of the screen

    I don't know what I did but now I can't see the left column of my screen on my mac.

    Check you TV aspect ratio or zoom settings via the TV remote.

  • How can I return to a previous version of Numbers? Or how can I have all my sheets show on a column on the left hand side, as in the previous version?

    I updated my Numbers for Mac only to find out that there are several changes that make it less appealing for me so far (and I don't think it's only the learning curve). Questions: a) can I somehow edit the location of where I can find all the sheets (right now they are on top of the page, and you can't see all of them listed at quick glance but must scroll/arrow through them) I have in that spreadsheet? In the previous version they were all easy access on the left hand side.
    Or b) can one go back to a previous version of a program somehow?
    Thank you for any leads/answers!
    L

    can I somehow edit the location of where I can find all the sheets (right now they are on top of the page, and you can't see all of them listed at quick glance but must scroll/arrow through them)
    On my machine I just hit shift-command-j (the keyboard shortcut I assigned in System Preferences) and a list of the sheets in the current document pops up:
    I type a number from the list and jump immediately to that sheet. The hands never have to leave the keyboard.
    (This particular document had a sheet named for each month.  But the sheets in your document automatically will be listed instead.)
    This is done via a Jump to Sheet Automator Service (Dropbox download).  To install just doubleclick the .workflow package and (if needed) click 'Download Anyway' in System Preferences > Privacy & Security.
    Installation will cause a new item to appear in your Numbers > Services menu.  Then, if you want a keyboard shortcut, go here in System Preferences and add one:
    You can rename or remove the service by holding down the option key in Finder and choosing Go > Library > Services. You can also view the AppleScript contaned within the service by opening the .workflow package in Automator.
    Note, also, that in Numbers 3 you don't have to use those left-right arrows upper right to slowly scroll left-right to the sheets that are out of view.  Just move your cursor up to the "band" with the "tabs" and drag left or right.  That's much faster than using the arrows.
    SG

  • In Firefox 29.0, how can I pin the bookmarks so they are all displayed on the left hand side (all the time)?

    Before the Firefox 29.0 upgrade, I had my bookmark list constantly displayed on the left-hand side of the Firefox screen. How can I get that in version29.0?
    Right now I have to click on the bookmark button and then on Bookmark menu to get to see my bookmarks. I want them permanently "pinned" to the left-hand side of the screen. Just moving the bookmark button is not enough.

    You can find the "View Bookmarks Sidebar" in the drop-down list of the "Show your bookmarks" button that is the dropmarker part of the star on the Navigation Toolbar to bookmark the current page.
    There is also a "Show Sidebars" icon in the Customize palette that you can drag on a toolbar or the "3-bar" Firefox menu to have access to the same items that you see in "View > Sidebars" (tap the Alt key or press F10 to show the Menu bar).

  • HT201269 unable to restore apps from itunes to new iphone5S. saw apps inside itunes during backupp but the apps are not on the left hand side for selection

    i just restore backup from iphone 4S to 5S however only basic apps are inside and some of the songs AND 3RD PART APPS ARE MISSING. backup from 4S apps can be seen, however apps does not appears on the left hand side of the apps page.

    Welcome to the discussions,
    did you try to transfer your purchases by right clicking on your ipod in the device list and choosing "transfer purchases"? http://support.apple.com/kb/HT1727 and http://support.apple.com/kb/HT1848

  • The typeface of my bookmarks on the left hand side and bookmarks toolbar is too small. Can I enlarge it please.

    On the left hand side I have all my bookmarks and bookmark toolbar across the top. The typeface is very small. Can I enlarge it please.

    You only see that Bookmarks Menu button with the drop marker on the Bookmarks Toolbar if the Menu bar is hidden.<br />
    Otherwise you can use the Bookmarks menu to access that list.

  • HT1481 I have an ipod shuffle which i need to reset as i can not sinc it on my laptop which is using windows 8, but when i open itunes i d not have the 'source panel' on the left hand side which should show up my ipod. any ideas what i need to do? please

    Hi  I have an ipod shuffle which worked well on my old pc but since i have tried to link it with my new laptop I cant get it to sinc. I have athorised the device to my laptop so i thought it maybe worth resetting it but all the info I have read tells me that to reset my ipod i need to open i tunes and on the left hand side in the 'source panel' i will find my ipod listed but when i open itunes i do not have a source panel so i cant reset it. i have spent days trying to get this problem sorted and am about to throw the thing away. I have tried to manually sinc the thing, i have installed and reinstalled the latest version of itunes, i have restarted my laptop but i dont know what to do next. any help would be very much appreciated. Many thanks in advance

    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    iPod not recognised by windows iTunes
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

  • Where is the iPhoto library stored and how can I browse to it in Finder?  The "Photos" option is not showing up on the left hand side.

    I created an app using Automator to batch resize my photos.  When I take photos with my iPhone 4s the resolution is so big I can't upload them to a web site, so I can select all the photos in an event and resize them down.  It's too time consuming to open each one in Preview and resize it manually.  This little app works perfectly!
    Here's the only thing I'd like to change - when the app starts up it asks which photos I want to resize.  I'd love it to default to the iPhoto library so I can choose the most recent event.  But I can't for the life of me find it!  Normally there's a choice on the left hand side that says Photos and in the automator finder window, it's not showing up.  I've looked through all the folders I can think of and can't find it.
    Help!

    You are not using iPhoto properly and are in danger of losing your photos
    iPhoto is a SQP database application and there are NO user servicable parts in the database (by default the iPhoto library)  It is extremely important that you NEVER make any changes of any sort to the content (or structure) of the iPhoto library
    The only safe (and suppoprted) way to resize photo is to select them and export using the various esize options in teh export dialogue and use those resized photos - this is a bathc process and does not involve Preview nor does it involve seperate processing for each photo
    LN

  • Can I adjust the size Firefox maximizes to, since it leaves a small sliver of space on the left-hand side, even when maximized?

    When I have my dock set to the left-hand side of my screen, Firefox maximizes to all but a small sliver of space on the left hand side. Is there a way to change the default maximized window parameters (in about:config or something), or is there an add-on that will allow you to do it?

    In Mac OS X v10.7 and later, the $HOME/Library folder is a hidden folder.
    Open Finder and use one of these:
    *Go > Go To Folder (Shift-Command-G) and in the dialog type: ~/Library
    *Open the "Go" menu and hold down the Option key to make the Library appear
    *http://kb2.adobe.com/cps/909/cpsid_90947.html Access hidden user library files
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder

  • Printing my own photos!  Does anyone know what happened to the area on the left hand side of iPhoto when you went into printing your own photos?  I used to be able to create a page of wallets and print it from my own computer and now I can't find it.Help

    Does anyone know what happened to printing your own photos in iphoto?  There used to be a thing on the left hand side of iphoto that you used to create wallets, 5x7, etc.  Now there is nothing there.  Can anyone help me?  I dont want to order stuff, i want to pirint my own.

    what version of iPhoto?
    LN

  • I am in my e-mail and a keyboard came up but only the left hand-side of the keyboard and I can't get rid of it, any idea how to make it go away?

    I am in my e-mail and a keyboard came up but only the left hand-side of the keyboard and I can't get rid of it, any idea how to make it go away?

    Have you turned the phone off? If so, and it hasn't fixed the issue, try a reset:
    Press and hold the Sleep/On/Off button and the Home button at the same time for approximately 10-15 seconds. Ignore the slide to turn off indicator, and wait for the Apple logo to reappear. Release buttons. No content will he changed with this process.
    Stedman

  • How do I add my Applications fold back onto the dock? People say I must drag it near the trash can, but that just puts it past that barrier. I am trying to get it back to where it disappeared from, on the left hand side near the finder icon.

    How do I add my Applications fold back onto the dock? People say I must drag it near the trash can, but that just puts it past that barrier. I am trying to get it back to where it disappeared from, on the left hand side near the finder icon. And how / why did it disappear?

    With respect, you actually cannot store folders on the left side of the Dock - only on the right side. I wonder if you're talking about Launchpad, which looks like a silver rocket and shows you your installed applications? It's not actually a shortcut to the Applications folder, though. You can certainly drag Launchpad into the left side of the Dock from the Applications folder.
    Matt

  • Can you tell help us... Does Apple sell a keyboard that has the number pad on the left hand side?

    We want to buy an I Mac but wonder if we can get an Apple keyboard that has the number pad on the left hand side as we are both left handed.  Do Apple sell them separately?  Thanks.

    Beat me to it
    There is also this one, from the Apple Store, a lot more expensive than MichelPM's choice though. (But it will function as a stand alone calculator as well as keypad for Mac)

Maybe you are looking for