GUI size problem

When I run this code the GUI doesn't provide enough space for my buttons. It provides enough room for my JLabels and TextFields, but cut's off the buttons.
public class ReceivingOrganizer extends JPanel
     private JFrame frame;
     private JPanel jpMain, jpLine1, jpLine2, jpCheckBoxPanel;
     private JLabel jlContainer, jlSeal, jlTopInstruct;
     private JButton find, print;
     private JFormattedTextField ftfContainer, ftfSeal;
     public static void main(String[] args)
          ReceivingOrganizer object = new ReceivingOrganizer();
          object.createGUI();
     public ReceivingOrganizer()
          super(new GridBagLayout());
          GridBagConstraints c = new GridBagConstraints();
          jpMain = new JPanel(new GridBagLayout());
          jpMain.setBorder(BorderFactory.createEmptyBorder(30,30,30,30));
          jlTopInstruct = new JLabel("Enter container number or seal number: ");
          c.gridwidth=GridBagConstraints.REMAINDER;
          jpMain.add(jlTopInstruct, c);
          c.gridwidth= GridBagConstraints.RELATIVE;
          jlContainer = new JLabel("Container: ");
          jpMain.add(jlContainer, c);
          c.gridwidth= GridBagConstraints.RELATIVE;
          ftfContainer = new JFormattedTextField();
          ftfContainer.setColumns(15);
          jpMain.add(ftfContainer, c);
          //ftfContainer.addKeyListener(this);
          c.gridwidth= GridBagConstraints.REMAINDER;
          c.fill=GridBagConstraints.BOTH;
          find = new JButton("Find");
          jpMain.add(find, c);
          //find.setActionCommand("find");
          //find.addActionListener(this);
          c.gridwidth= GridBagConstraints.RELATIVE;
          jlSeal = new JLabel("Seal: ");
          jpMain.add(jlSeal, c);
          ftfSeal = new JFormattedTextField();
          ftfSeal.setColumns(15);
          jpMain.add(ftfSeal, c);
          //ftfSeal.addKeyListener(this);
          c.gridwidth= GridBagConstraints.REMAINDER;
          print = new JButton("Print");
          print.setEnabled(false);
          jpMain.add(print, c);
          //print.setActionCommand("print");
          //print.addActionListener(this);
          jpMain.setMinimumSize(jpMain.getSize());
          add(jpMain, c);
     public void createGUI()
          frame = new JFrame("Receiving Organizer");
          frame.setResizable(true);
          frame.setLocationByPlatform(true);
          frame.setMinimumSize(frame.getSize());
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.add(new ReceivingOrganizer());
          //Display the window.
          frame.pack();
          frame.setVisible(true);
}

Don't use GridBagConstraints.RELATIVE for more than one component in the same row, and then only for the second-last component in the row. Read the API:
Use RELATIVE to specify that the component's display area will be from gridx to the next to the last one in its row.
Additionally, before a panel is validated or made visible, its size is zero, so you're effectively setting the minmum size to [0,0] -- not, I'm usre, what you intended to do. Ditto for the JFrame. I've added a couple of sysouts for you to see this for yourself.import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.*;
public class ReceivingOrganizer extends JPanel {
  private JFrame frame;
  private JPanel jpMain;
  private JLabel jlContainer,  jlSeal,  jlTopInstruct;
  private JButton find,  print;
  private JFormattedTextField ftfContainer,  ftfSeal;
  public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        new ReceivingOrganizer().createGUI();
  public ReceivingOrganizer() {
    super(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    jpMain = new JPanel(new GridBagLayout());
    jpMain.setBorder(BorderFactory.createEmptyBorder(30, 30, 30, 30));
    jlTopInstruct = new JLabel("Enter container number or seal number: ");
    c.gridwidth = GridBagConstraints.REMAINDER;
    jpMain.add(jlTopInstruct, c);
    c.gridwidth = 1;//GridBagConstraints.RELATIVE;
    jlContainer = new JLabel("Container: ");
    jpMain.add(jlContainer, c);
    c.gridwidth = GridBagConstraints.RELATIVE;
    ftfContainer = new JFormattedTextField();
    ftfContainer.setColumns(15);
    jpMain.add(ftfContainer, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    //c.fill = GridBagConstraints.BOTH;
    find = new JButton("Find");
    jpMain.add(find, c);
    c.gridwidth = 1;//GridBagConstraints.RELATIVE;
    jlSeal = new JLabel("Seal: ");
    jpMain.add(jlSeal, c);
    c.gridwidth = GridBagConstraints.RELATIVE;
    ftfSeal = new JFormattedTextField();
    ftfSeal.setColumns(15);
    jpMain.add(ftfSeal, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    print = new JButton("Print");
    print.setEnabled(false);
    jpMain.add(print, c);
    System.out.println("jpMain: " + jpMain.getSize());
    //jpMain.setMinimumSize(jpMain.getSize());
    add(jpMain, c);
    revalidate();
  public void createGUI() {
    frame = new JFrame("Receiving Organizer");
    frame.setResizable(true);
    frame.setLocationByPlatform(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.add(this);
    System.out.println("Before pack: " + frame.getSize());
    //Display the window.
    frame.pack();
    System.out.println("After pack: " + frame.getSize());
    frame.setMinimumSize(frame.getSize());
    frame.setMinimumSize(frame.getSize());
    frame.setVisible(true);
}db
edit And you had two instances of ReceivingOrganizer, one instantiated in main(...) and the other in createGUI(). You don't need this, just add the present instance to the frame.
Edited by: DarrylBurke

Similar Messages

  • HP 8750 Paper-Size Problem where it keeps telling me the paper is too big (it's set up for 11x17)

    I've got an HP 8750 printer running with a Windows 7 Ultimate machine, and I've got a paper-size problem where it keeps telling me the paper is too big. It's set up for 11 x 17. 
    The actual wording on the printer is: 
    Paper installed is larger than needed. Press cancel to replace with correct size, if you wish to save paper, or press check mark to continue. 
    When you press the check mark it feeds the paper, but for a multi page-document I have to press the check mark for each page to feed.
    How do I get it to print 11 x 17 paper without having to press the check mark for each page?

    ''guigs2 [[#answer-672422|said]]''
    <blockquote>
    NoScript stops cookies, please disable this addon/extension as well as make sure that the language en-us is installed.
    # 1) Open up the Firefox Preferences tab. You can do this by typing about:preferences in the URL bar.
    # 2) Click "Content"
    # 3) Next to "Languages", click "Choose"
    # 4) Select "English/United States [en-us]", click "Add"
    # 5) re-open "about:accounts"
    # 6) Click "Get Started"
    </blockquote>
    Thank you for replying. Unfortunately, I already did all of these things. As you can see from the below screenshot, the language is already set. Also, this screenshot was taken in Safe Mode, so NoScript is not enabled. About:accounts still says I need to enable cookies for some reason. So, this solution didn't work....

  • GUI related problem in solaris 8 02/04

    Hello all,
    I am facing GUI related problem in the software running on solaris when I upgraded from solaris 8 02/02 to 8 02/04.
    The GUI which was working fine on 02/02 was giving some menu selection problem in 02/04. In GUI applications i was unable to select items after double clicking it in solaris 8 02/04 while it was working fine in solaris 8 02/02.
    Are there any O.S. related problem?
    Thanks and regards,
    Ankit

    Wolfgang073 wrote:
    Hi guys and ladys!
    I added the LD_LIBRARY_PATH, Why are you doing that. It's probably a bad idea.
    but the Openwindows not run OK (e.g. start cmdtool window without csh % prompt etc.).That's very possible. Don't make global changes to LD_LIBRARY_PATH (by putting in your login files for example). Instead if you need it to run a particular program, make a wrapper that sets the variable and then calls the program. That will limit the scope of those changes.
    vi .login
    # Erasing LD_LIBRARY_PATH
    setenv LD_LIBRARY_PATH
    # Important Paths set
    setenv LD_LIBRARY_PATH     /usr/ucblib:$LD_LIBRARY_PATHDon't do that.
    Darren

  • Is there a solution to Rapidweaver Stacks Cache size problems?

    Is there a solution to Rapidweaver Stacks Cache size problems?
    My website http://www.optiekvanderlinden.be , has about 100 pages and is about 250MB in size. Every time I open RapidWeaver with the Stacks-plugin, the user/library/cache/com.yourhead.YHStacksKit folder grows to several Gigabytes in size. If I don't  manually empty the com.yourhead.YHStacksKit Cache daily, AND empty the Trash before i turn off my mac, my Mac still has problems and stalls at startup the next day. Sometimes up to 5 minutes and more before he really boots. If i have a been working on such a large site for a few weeks without deleting that cache, than my iMac doesn't start up anymore, and the only thing left to do is completely reinstall the iOs operating system. This problem doesn't happen the days i use all my other programs but don't use Rapidweaver.
    Does anyone know a solution and / or what is the cause of this?

    once more,
    i just launched my project in Rapidweaver, and WITHOUT making any changes to my pages, the cache/com.yourhead.YHStacksKit folder filled itself with 132 folders (total 84Mb), most of them containing images of specific pages etc. The largest folder in the cache is the one with the images of a page containing a catalogue of my company, this folder is 7Mb. It seems by just starting up a project, immediately different folders are created containing most of the images in my project, and some folders with a log.txt file. Still i don't see the reason why it is filling op a huge Cache even without making changes to the project. I have 2 different sites, so 2 different projects, and i get this with both of them.

  • My mobile form of my homepage have some size problems!

    Hello! My mobile form of my homepage have some size problems. All pages gets right size exept one. It only cover halv of the page. What is wrong?

    Hello,
    Can you please share the URl of the page with us so that we can get a better idea of the issue.
    Usually this happens when any object is placed outside the browser are in Phone layout.
    Regards
    Vivek

  • Size problem with Email sent from SAP

    Hi everyone,
    All our layouts today were developed with sap script
    We started to send them by mail, using the standard way.
    in the process they are converted to PDF format from OTF, because of this activity the size of the mail that I am getting is 1 Mega where as the source is only 300K (approximately).
    We are already flagged the option of compressing.
    As we see now we don't have any option to make the email to be smaller.
    Is someone already encountered this problem? What option do I have? (Except of developing the layout again in Adobe)
    Thanks allot
    Udi
    SD consultant

    First thanks
    Sayali Paradkar , we used in the past this function module, but it was even worse.
    We started to use the standard process of sending mail.
    As we understand the program of converting OTF format to PDF cause the size problem.
    And its define to send PDF out of the SAP, also we are using SAP definitions to compress all files :nSE38 -> RSTXPDF3 -> option FLATE_COMPR_OFF = OFF
    But still the mails are very big,
    Thanks again
    Udi Marom

  • Itsmobile Alv page size problems

    Hi All
    I am having 2 problems with alv grids on the itsmobile.
    My first problem is with the page size, in that I now have a very large scroll area.  The horizontal scroll bar is down near the status bar and I also have two vertical scroll bars that is eating into my screen size.
    I have l looked at note 1356836 and I have updated the alvpagesize in my gui config but this has made no difference.
    Its weird as I have buttons that appear right underneath the custom control  for the alv grid and they are appearing correctly under the blank alv grid, but yet there is a large vertical scroll area on mobile screen.
    My second problem is that the select all button is being displayed even though I have this turned off in the layout ( p_layout-NO_ROWMARK = abap_true.)  This is causing my horizontal layout to scroll of the page as it is adding about 3 character to the width of the screen.
    We are on 701 SAPKB70105.
    Many thanks
    Darren

    Hi All
    You can also copy the css file in itsmobile to your internet service.
    By putting the following code into the css and updating the gui config in sicf for the internet service you can remove the vertical scroll bar. 
    this problem only seems to happen when you use the mobile4 gernation style.
    /* --- MOBILE BODY -
    .MobileHtml

  • JDialog size problem

    Hi,
    I'd appreciate if someone could help me with this problem: I try create a custom dialog window. It pops up OK, but it defaults to the SMALLEST size possible. So i subsequently have to drag it bigger... Also, how do I suspend access to the primary gui while the dialog box is still unanswered?
    Code:-
    AutoGen ag = new AutoGen(); // my custom gui for dialog
    JDialog dialog = new JDialog();
    dialog.getContentPane().setLayout(new BorderLayout());
    dialog.setContentPane(ag);
    dialog.setVisible(true);

    dialog.getContentPane().setLayout(new BorderLayout()); // not required BorderLayout is the default
    dialog.setContentPane(ag);
    dialog.pack(); // sizes the dialog to the preferred size of your AutoGen panel
    dialog.setVisible(true);

  • Printing and scanning size problems (half size)

    Hello,
    I am having an issue with my Pixma MP170.  When printing multiple pages or scanning a paper document, the size come out really small all of a sudden and two pages will be together in one print or scan.   I looked for updated drivers but that doesn't look to be the issue and the problem pesists.
    I tried to reset the printer to default but nothing. 
    Not sure how to proceed.
    Thanks for any suggestion.

    I have had something very like your problem.
    Mine is printing quarter size in landscape and is also not scanning or doing copies at the moment..
    I can find no way of setting it and it ignores all settings sent from the computer.
    It printed one test page correctly and once I tried printing a small text file it came out small and in landscape and now even the test page is also small and also in landscape.
    I am tempted to look inside for an engineering jumper or backup battery.
    Mine is an MP270.

  • Edit box length size problem...at Detail Section.

    hi.
    Plz have a look on below image.
    This is my problem.
    in details section i put one edit box... like below..
    the data is comming from data base..
    Header 1
    but the size of the filed is more than the size of the Edit box..
    i all ready checked  can grow option in format field common properties.
    but horizontal line is not adjusting ....
    what should i do...

    Hi Srini,
    You can't place another object directly below an object that 'grows'.
    Create another section and move the line to this new section.
    -Abhilash

  • Swing layout/size problem with JFrame and JApplet.

    I have a class that extends a JFrame, the classes layout is BorderLayout. I then have a class that extend JApplet, this classes layout is GridBagLayout (this class has a JTabbedPane - which contains JPanels). The problem I'm having is no matter how big I make the size of the applet or frame (using setSize), the applet/frame stays the same size - no matter how large I make it.
    Can anyone please help?
    Thanks,
    dosteov

    Here is the basic code:
    Thanks in advance,
    dosteov
    public class EADAdm extends JApplet
    EADAdmFrame theFrame = new EADAdmFrame(this);
         public void init()
              // Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
    //          symantec.itools.lang.Context.setApplet(this);
              // This line prevents the "Swing: checked access to system event queue" message seen in some browsers.
              getRootPane().putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);
              // 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
              getContentPane().setLayout(new GridBagLayout());
              setEnabled(false);
              getContentPane().setBackground(java.awt.Color.lightGray);
              setSize(800,800);
              getContentPane().add(AdmTab, new com.symantec.itools.awt.GridBagConstraintsD(0,1,2,1,0.5,0.5,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.HORIZONTAL,new Insets(3,12,4,14),120,120));
              AdmTab.setFont(new Font("Dialog", Font.PLAIN, 12));
              titleLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
              titleLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
              titleLbl.setText("EAD Administration");
              getContentPane().add(titleLbl, new com.symantec.itools.awt.GridBagConstraintsD(0,0,1,1,0.0,0.0,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.NONE,new Insets(12,36,0,0),307,15));
              titleLbl.setForeground(java.awt.Color.blue);
              titleLbl.setFont(new Font("Dialog", Font.BOLD, 15));
              exitBtn.setText("Exit EAD Administration");
              exitBtn.setActionCommand("Exit EAD Administration");
              getContentPane().add(exitBtn, new com.symantec.itools.awt.GridBagConstraintsD(0,2,2,1,0.0,0.0,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.NONE,new Insets(6,371,10,14),66,8));
              exitBtn.setFont(new Font("Dialog", Font.PLAIN, 12));
         //theFrame.setVisible(false);
         login();
         AdmTab.addTab("Administration", new LogoPanel() );
         userPanel = createUserPanel();
         AdmTab.addTab("Edit Users", userPanel );
         fpoPanel = createFPOPanel();
         AdmTab.addTab("Edit FPO", fpoPanel );
         regulationPanel = createRegulationPanel();
         AdmTab.addTab("Edit Regulations", regulationPanel );
         rolloverPanel = createRolloverPanel();
         AdmTab.addTab("Rollover", rolloverPanel );           
              //{{REGISTER_LISTENERS
         SymMouse aSymMouse = new SymMouse();
              this.addMouseListener(aSymMouse);
              SymAction lSymAction = new SymAction();
              exitBtn.addActionListener(lSymAction);
              SymKey aSymKey = new SymKey();
              this.addKeyListener(aSymKey);
         theFrame.getContentPane().add(this);
    public class EADAdmFrame extends JFrame
    EADAdm theApplet;
    public EADAdmFrame(EADAdm theMainApplet)
              //{{INIT_CONTROLS
         //     theApplet = theMainApplet;
         //     this.getContentPane().add(theApplet);
              getContentPane().setLayout(new BorderLayout(0,0));
              getContentPane().setBackground(java.awt.Color.lightGray);
              setSize(1000,1000);
              setVisible(false);
         theApplet = theMainApplet;
              //{{REGISTER_LISTENERS
              SymWindow aSymWindow = new SymWindow();
              this.addWindowListener(aSymWindow);
              SymComponent aSymComponent = new SymComponent();
              this.addComponentListener(aSymComponent);

  • JTable size problems due to layout/grid...how can I fix?

    This is my code. When the button "Modify Entries" is pressed, it shows a JTable that imports a file called, "entries.data". The items in this file can be read and saved using this program. The problem is that the table is so small when it first opens. How can I set all my buttons to the very bottom of the form and make the table take up more space at the top? It looks to me as if this layout is treating it with the same dimensions as the buttons'.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.DefaultTableModel;
    import java.util.*;
    import java.io.*;
    public class CPT extends JPanel implements ActionListener
        protected JButton ModifyEntriesButton, ViewEntriesButton, SearchEntriesButton, SaveButton, BackButton;
        private final static String newline = "\n";
        private DefaultTableModel model;
        public CPT ()
            super (new GridLayout (10, 0));
            model = new PropertiesModel ("entries.data");
            ModifyEntriesButton = new JButton ("Modify Entries");
            ModifyEntriesButton.setVerticalTextPosition (AbstractButton.TOP);
            ModifyEntriesButton.setHorizontalTextPosition (AbstractButton.LEFT);
            ModifyEntriesButton.setToolTipText ("Click this button to modify database entries.");
            ModifyEntriesButton.setMnemonic (KeyEvent.VK_M);
            ModifyEntriesButton.setActionCommand ("ModifyEntries");
            ModifyEntriesButton.addActionListener (this);
            ViewEntriesButton = new JButton ("View Entries");
            ViewEntriesButton.setVerticalTextPosition (AbstractButton.CENTER);
            ViewEntriesButton.setHorizontalTextPosition (AbstractButton.LEFT);
            ViewEntriesButton.setToolTipText ("Click this button to add view all database entries.");
            ViewEntriesButton.setMnemonic (KeyEvent.VK_V);
            ViewEntriesButton.setActionCommand ("ViewEntries");
            ViewEntriesButton.addActionListener (this);
            SearchEntriesButton = new JButton ("Search Entries");
            SearchEntriesButton.setVerticalTextPosition (AbstractButton.BOTTOM);
            SearchEntriesButton.setHorizontalTextPosition (AbstractButton.LEFT);
            SearchEntriesButton.setToolTipText ("Click this button to search through all database entries.");
            SearchEntriesButton.setMnemonic (KeyEvent.VK_S);
            SearchEntriesButton.setActionCommand ("SearchEntries");
            SearchEntriesButton.addActionListener (this);
            SaveButton = new JButton ("Save");
            SaveButton.setVerticalTextPosition (AbstractButton.TOP);
            SaveButton.setHorizontalTextPosition (AbstractButton.RIGHT);
            SaveButton.setToolTipText ("Click this button to save database entries.");
            SaveButton.setMnemonic (KeyEvent.VK_S);
            SaveButton.setActionCommand ("Save");
            SaveButton.addActionListener (this);
            BackButton = new JButton ("Back");
            BackButton.setVerticalTextPosition (AbstractButton.BOTTOM);
            BackButton.setHorizontalTextPosition (AbstractButton.RIGHT);
            BackButton.setToolTipText ("Click this button to return to the main menu.");
            BackButton.setMnemonic (KeyEvent.VK_B);
            BackButton.setActionCommand ("Back");
            BackButton.addActionListener (this);
            add (ModifyEntriesButton);
            add (ViewEntriesButton);
            add (SearchEntriesButton);
        class PropertiesModel extends DefaultTableModel
            public PropertiesModel (String filename)
                addColumn ("Item Number");
                addColumn ("Description");
                addColumn ("Price");
                //Fill model with data from property file
                Properties props = readFile (filename);
                if (props != null)
                    Enumeration coll = props.keys ();
                    while (coll.hasMoreElements ())
                        String property = (String) coll.nextElement ();
                        String value = props.getProperty (property, "");
                        addRow (new Object[]
                            property, value
        private Properties readFile (String filename)
            try
                Properties props = new Properties ();
                props.load (new FileInputStream (filename));
                return props;
            catch (IOException ioe)
                return null;
        private boolean saveFile (String filename)
            try
                Properties props = new Properties ();
                for (int i = 0 ; i < model.getRowCount () ; i++)
                    props.put (model.getValueAt (i, 0), model.getValueAt (i, 1));
                props.store (new FileOutputStream (filename), null);
                return true;
            catch (IOException ioe)
                return false;
        public void actionPerformed (ActionEvent e)
            if ("ModifyEntries".equals (e.getActionCommand ()))
                removeAll ();
                add (new JScrollPane (new JTable (model)), BorderLayout.CENTER);
                add (SaveButton);
                add (BackButton);
                invalidate ();
                updateUI ();
            if ("ViewEntries".equals (e.getActionCommand ()))
                removeAll ();
                add (BackButton);
                invalidate ();
                updateUI ();
            if ("SearchEntries".equals (e.getActionCommand ()))
                removeAll ();
                add (BackButton);
                invalidate ();
                updateUI ();
            if ("Back".equals (e.getActionCommand ()))
                removeAll ();
                add (ModifyEntriesButton);
                add (ViewEntriesButton);
                add (SearchEntriesButton);
                invalidate ();
                updateUI ();
            if ("Save".equals (e.getActionCommand ()))
                if (saveFile ("entries.data"))
                    JOptionPane.showMessageDialog (null, "File saved successfully.");
                else
                    JOptionPane.showMessageDialog (null, "File could not be saved!");
        // Create the GUI and show it. For thread safety,
        // this method should be invoked from the
        // event-dispatching thread.
        private static void createAndShowGUI ()
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated (true);
            //Create and set up the window.
            JFrame frame = new JFrame ("Swisha Computer House");
            frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new CPT ();
            newContentPane.setOpaque (true); //content panes must be opaque
            frame.setContentPane (newContentPane);
            //Display the window.
            frame.pack ();
            frame.setSize (300, 300);
            frame.setVisible (true);
        public static void main (String[] args)
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater (new Runnable ()
                public void run ()
                    createAndShowGUI ();
    }Hey, and if anyone knows how to get the first column's numbers from the file to show up in descending order (1 through to, say, 500), please let me know.
    Thank you for any help.

    It looks to me as if this layout is treating it with the same dimensions as the buttons'.Thats the way a GridLayout works.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]How to Use Layout Managers. You can mix an match individual Layout Managers to get the effect desired.
    I would suggest you need to change your design. Your code for continually removing and adding components is not the best design. You should probably have a panel with all your buttons. Then you would have different panels for each of your sub functions. The display of these panels would be controlled by a Card Layout. The tutorial has working examples of this.
    You can't use a Properties file to save data from the table (at least not the way you are attempting to use it). I gave you a solution in your last posting.

  • PDF File Size Problem

    Hi,
    I am using Adobe Acrobat Elements 7.0 in my computer to convert files like .txt and .doc to .pdf files. But currently I'm facing a problem with the converted .pdf file size. For example, my .doc file is 5MB and after I convert to a .pdf file, it becomes 10MB. The file size basically multiplies itself by 2.
    I've tried converting .txt and .doc files and it gives me the same problem. I've tried reinstalling, tried all kinds of settings, and recreating user profile but it doesn't help. Can anyone help me? Thank you very much.

    Sorry. The problem is caused when I want to password protect a .pdf using elements. So I used Adobe Reader to open the .pdf file then I'll print using Adobe Printer so that I can password protect it and output file size is actually 10 times the normal .pdf file.
    Please help!!

  • Print Paper Size Problem after Mavericks Upgrade

    I migrated my Apps, Data and System Settings from a Macbook running OSX Lion to a new Macbook Pro running Mavericks.
    The problem I now have is that the application 'Family Tree Maker 2' cannot get the paper size right. No matter which Paper size I select, it is shown as half size in the Application Print Preview screen and this error carries through to actual printing.
    so A4 210 by 297 mm displays as 5.8 x 4.1 inches (which is Half Size).
    The problem is significant because the application formats it's output to fit into half of the available space.
    I have unsuccessfully tried;
    - removing and reinstalling the Application.
    - Adding my Brother Laser printer with the latest Mavericks compatible driver.
    - Resetting the printing system.
    - Repairing disk permissions
    - Adding a new User Account
    - Deleting plists associated with com.ancestry
    iWork Pages is working correctly.
    I have raised this with ancestry.com however it appears that I am the only person that has experienced this problem.
    Any suggestions would be appreciated.

    Problem is worse than that. Whilst the Paper is shown as half size, the family tree diagram boxes are produced twice as wide as they should be.
    If I select A4 Paper, a diagram that would fit on one page is now spread across two.
    If I select A3 Paper, the preview indicates the paper size as A4 8.3 x 5.8 inches however the diagram size and position on the paper are unchanged and I just get loads of white space around the outside of the diagram.
    It does sound like an Application problem but it is still working fine on my old OSX Lion machine. Something has happened in the migration.

  • MTU Size Problem Loading Certain Webpages

    Hello Colleagues,
    I'm having a strange problem dealing with MTU sizes and loading certain webpages. I am aware of the default Microsoft MTU of 1500 and also using GRE IPSEC Tunnels recommended at MTU size 1400. I have since manually set some users PC's to MTU of 1400 and most of those users are experiencing no issues. However, there are a few users who still experience website loading issues even though I have manually changed their MTU size to 1400.
    These are domain accounts will the same image loads on their machines, so all have the same permissions, rights, firewall settings, etc. They all use the same LAN, switches, and routers.
    Here are the router configs, router 1 and router 2
    Router 1
    Current configuration : 9006 bytes
    version 15.3
    no service pad
    service timestamps debug datetime msec localtime
    service timestamps log datetime msec localtime
    service password-encryption
    hostname R-US-RS-WVPN1
    boot-start-marker
    boot system flash:c1900-universalk9-mz.SPA.153-1.T1.bin
    boot system flash:c1900-universalk9-mz.SPA.151-3.T1.bin
    boot-end-marker
    logging buffered 64000
    enable secret 5 *removed*
    no aaa new-model
    clock timezone CET 1 0
    clock summer-time CET recurring last Sun Mar 2:00 last Sun Oct 3:00
    errdisable recovery cause udld
    errdisable recovery cause bpduguard
    errdisable recovery cause rootguard
    errdisable recovery cause pagp-flap
    errdisable recovery cause dtp-flap
    errdisable recovery cause link-flap
    errdisable recovery interval 303
    ip cef
    ip domain name corp.com
    ip name-server 10.###.8.21
    ip name-server 10.###.8.96
    ip inspect dns-timeout 90
    ip inspect tcp idle-time 60
    ip inspect name fw smtp timeout 120
    ip inspect name fw ftp timeout 120
    ip inspect name fw realaudio
    ip inspect name fw tftp timeout 30
    ip inspect name fw udp timeout 30
    ip inspect name fw tcp timeout 60
    no ipv6 cef
    multilink bundle-name authenticated
    crypto pki trustpoint TP-self-signed-316595902
    enrollment selfsigned
    subject-name cn=IOS-Self-Signed-Certificate-316595902
    revocation-check none
    rsakeypair TP-self-signed-316595902
    crypto pki certificate chain TP-self-signed-316595902
    certificate self-signed 01
      *removed*
            quit
    license udi pid CISCO1921/K9 sn FTX153182M8
    spanning-tree vlan 229 priority 8192
    redundancy
    ip ssh version 2
    crypto isakmp policy 10
    hash md5
    authentication pre-share
    lifetime 3600
    crypto isakmp key *removed* address 70.###.172.142
    crypto isakmp key *removed* address 184.###.###.254
    crypto isakmp keepalive 35 11
    crypto ipsec transform-set FY-WVPN-Tunnel esp-aes esp-md5-hmac
    mode tunnel
    crypto map vpn 10 ipsec-isakmp
    set peer 70.###.172.142
    set peer 184.###.###.254
    set transform-set FY-WVPN-Tunnel
    match address gre-tunnel-list
    interface Loopback0
    ip address 10.###.0.10 255.255.255.255
    interface Tunnel2291
    description Primary-TimewarnerTelecom-Ral-FayWVPN1
    ip address 10.###.99.26 255.255.255.252
    no ip redirects
    cdp enable
    tunnel source 66.###.161.126
    tunnel destination 184.###.###.254
    crypto map vpn
    interface Tunnel2293
    description Primary-TimewarnerTelecom-Ral-FayWVPN2
    ip address 10.###.99.154 255.255.255.252
    no ip redirects
    cdp enable
    tunnel source 66.###.161.126
    tunnel destination 70.###.172.142
    crypto map vpn
    interface Embedded-Service-Engine0/0
    no ip address
    shutdown
    interface GigabitEthernet0/0
    description TW Telecom/DMVPN1
    ip address 66.###.161.126 255.255.255.252
    ip access-group Block-Internet in
    ip access-group Block-Internet out
    duplex auto
    speed auto
    no cdp enable
    crypto map vpn
    interface GigabitEthernet0/1
    no ip address
    duplex auto
    speed auto
    interface GigabitEthernet0/0/0
    switchport access vlan 229
    no ip address
    interface GigabitEthernet0/0/1
    switchport access vlan 229
    no ip address
    interface GigabitEthernet0/0/2
    switchport access vlan 229
    no ip address
    interface GigabitEthernet0/0/3
    description PBX Eth1
    switchport access vlan 229
    no ip address
    interface Vlan1
    no ip address
    shutdown
    interface Vlan229
    ip address 10.###.229.253 255.255.255.0
    ip helper-address 10.###.231.201
    standby 229 ip 10.###.229.254
    standby 229 priority 105
    standby 229 preempt
    router eigrp 100
    network 10.0.0.0
    ip forward-protocol nd
    no ip http server
    ip http secure-server
    ip route 70.###.172.142 255.255.255.255 66.###.161.125
    ip route 184.###.###.254 255.255.255.255 66.###.161.125
    ip route 205.###.96.180 255.255.255.252 66.###.161.125
    ip access-list extended Block-Internet
    permit esp host 66.###.161.126 host 184.###.###.254
    permit esp host 184.###.###.254 host 66.###.161.126
    permit udp host 66.###.161.126 host 184.###.###.254 eq isakmp
    permit udp host 184.###.###.254 host 66.###.161.126 eq isakmp
    permit esp host 66.###.161.126 host 70.###.172.142
    permit esp host 70.###.172.142 host 66.###.161.126
    permit udp host 66.###.161.126 host 70.###.172.142 eq isakmp
    permit udp host 70.###.172.142 host 66.###.161.126 eq isakmp
    permit icmp host 66.###.161.126 host 184.###.###.254
    permit icmp host 184.###.###.254 host 66.###.161.126
    permit icmp host 66.###.161.126 host 70.###.172.142
    permit icmp host 70.###.172.142 host 66.###.161.126
    permit icmp any any echo-reply
    permit icmp any any time-exceeded
    permit icmp any any packet-too-big
    permit icmp any any traceroute
    permit icmp any any unreachable
    deny   ip any any
    deny   icmp any any
    ip access-list extended gre-tunnel-list
    permit gre host 66.###.161.126 host 184.###.###.254
    permit gre host 66.###.161.126 host 70.###.172.142
    logging host 10.100.###.254
    logging host 10.100.###.246
    snmp-server community a RW 20
    snmp-server community r RO 20
    snmp-server community a RW 20
    snmp-server community r RO 20
    snmp-server community P_RW RW
    snmp-server community P_RO RO
    snmp-server enable traps entity-sensor threshold
    snmp-server host 10.100.###.246 public
    snmp-server host 10.100.###.254 public
    access-list 20 permit 10.###.9.3
    access-list 20 permit 10.###.8.16
    access-list 20 permit 10.100.###.249
    access-list 20 permit 10.100.###.254
    access-list 20 permit 10.100.###.246
    control-plane
    banner motd ^CCCCCCC
    ****************** Warning! Warning! Warning! ********************
    This system is restricted to authorized users for business
    purposes.  Unauthorized access is a violation of the law.  This
    service may be monitored for administrative and security reasons.
    By proceeding, you consent to this monitoring
    ****************** Warning! Warning! Warning! ********************
    ^C
    line con 0
    login local
    line aux 0
    line 2
    no activation-character
    no exec
    transport preferred none
    transport input all
    transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
    stopbits 1
    line vty 0 4
    exec-timeout 60 0
    password 7 *removed*
    login local
    transport input ssh
    line vty 5 15
    exec-timeout 60 0
    password 7 *removed*
    login local
    transport input ssh
    scheduler allocate 20000 1000
    ntp server 10.###.8.8 prefer
    ntp server 10.###.231.200 prefer
    ntp server 10.###.8.69
    ntp server 10.###.1.6 prefer
    end
    Router 2
    Current configuration : 9013 bytes
    version 15.3
    no service pad
    service timestamps debug datetime msec localtime
    service timestamps log datetime msec localtime
    service password-encryption
    hostname R-US-RS-WVPN2
    boot-start-marker
    boot system flash:c1900-universalk9-mz.SPA.153-1.T1.bin
    boot system flash:c1900-universalk9-mz.SPA.151-3.T1.bin
    boot-end-marker
    logging buffered 64000
    logging console critical
    enable secret 5 *removed*
    no aaa new-model
    clock timezone CET 1 0
    clock summer-time CET recurring last Sun Mar 2:00 last Sun Oct 3:00
    errdisable recovery cause udld
    errdisable recovery cause bpduguard
    errdisable recovery cause rootguard
    errdisable recovery cause pagp-flap
    errdisable recovery cause dtp-flap
    errdisable recovery cause link-flap
    errdisable recovery interval 303
    ip cef
    ip domain name corp.mann-hummel.com
    ip name-server 10.###.8.21
    ip name-server 10.###.8.96
    ip inspect dns-timeout 90
    ip inspect tcp idle-time 60
    ip inspect name fw smtp timeout 120
    ip inspect name fw ftp timeout 120
    ip inspect name fw realaudio
    ip inspect name fw tftp timeout 30
    ip inspect name fw udp timeout 30
    ip inspect name fw tcp timeout 60
    ipv6 multicast rpf use-bgp
    no ipv6 cef
    multilink bundle-name authenticated
    crypto pki trustpoint TP-self-signed-3179596086
    enrollment selfsigned
    subject-name cn=IOS-Self-Signed-Certificate-3179596086
    revocation-check none
    rsakeypair TP-self-signed-3179596086
    crypto pki certificate chain TP-self-signed-3179596086
    certificate self-signed 01
      *removed*
            quit
    license udi pid CISCO1921/K9 sn FTX153182M2
    spanning-tree vlan 229 priority 1###84
    redundancy
    ip ssh version 2
    crypto isakmp policy 10
    hash md5
    authentication pre-share
    lifetime 3600
    crypto isakmp key *removed* address 70.###.172.142
    crypto isakmp key *removed* address 184.###.###.254
    crypto isakmp keepalive 35 11
    crypto ipsec transform-set Fay-Ral-WVPN-Tunnel esp-aes esp-md5-hmac
    mode tunnel
    crypto map vpn 10 ipsec-isakmp
    set peer 184.###.###.254
    set peer 70.###.172.142
    set transform-set Fay-Ral-WVPN-Tunnel
    match address gre-tunnel-list
    interface Loopback0
    ip address 10.###.0.12 255.255.255.255
    interface Tunnel2292
    description Failover-TimewarnerCable-Ral-Fay-WVPN2
    ip address 10.###.99.30 255.255.255.252
    no ip redirects
    cdp enable
    tunnel source 96.###.25.226
    tunnel destination 184.###.###.254
    crypto map vpn
    interface Tunnel2294
    description Failover-TimewarnerCable-Ral-Fay-WVPN2
    ip address 10.###.99.158 255.255.255.252
    no ip redirects
    cdp enable
    tunnel source 96.###.25.226
    tunnel destination 70.###.172.142
    crypto map vpn
    interface Embedded-Service-Engine0/0
    no ip address
    shutdown
    interface GigabitEthernet0/0
    description Fay-Ral WVPN
    ip address 96.###.25.226 255.255.255.252
    ip access-group Block-Internet in
    ip access-group Block-Internet out
    duplex auto
    speed auto
    no cdp enable
    crypto map vpn
    interface GigabitEthernet0/1
    no ip address
    shutdown
    duplex auto
    speed auto
    interface GigabitEthernet0/0/0
    switchport access vlan 229
    no ip address
    interface GigabitEthernet0/0/1
    switchport access vlan 229
    no ip address
    interface GigabitEthernet0/0/2
    switchport access vlan 229
    no ip address
    interface GigabitEthernet0/0/3
    description PBX Eth2
    switchport access vlan 229
    no ip address
    interface Vlan1
    no ip address
    shutdown
    interface Vlan229
    ip address 10.###.229.252 255.255.255.0
    ip helper-address 10.###.231.201
    standby 229 ip 10.###.229.254
    standby 229 preempt
    router eigrp 100
    network 10.0.0.0
    ip forward-protocol nd
    no ip http server
    ip http secure-server
    ip route 70.###.172.142 255.255.255.255 96.###.25.225
    ip route 184.###.###.254 255.255.255.255 96.###.25.225
    ip route 205.###.96.180 255.255.255.252 66.###.161.125
    ip access-list extended Block-Internet
    permit esp host 96.###.25.226 host 184.###.###.254
    permit esp host 184.###.###.254 host 96.###.25.226
    permit udp host 96.###.25.226 host 184.###.###.254 eq isakmp
    permit udp host 184.###.###.254 host 96.###.25.226 eq isakmp
    permit esp host 96.###.25.226 host 70.###.172.142
    permit esp host 70.###.172.142 host 96.###.25.226
    permit udp host 96.###.25.226 host 70.###.172.142 eq isakmp
    permit udp host 70.###.172.142 host 96.###.25.226 eq isakmp
    permit icmp host 96.###.25.226 host 184.###.###.254
    permit icmp host 184.###.###.254 host 96.###.25.226
    permit icmp host 96.###.25.226 host 70.###.172.142
    permit icmp host 70.###.172.142 host 96.###.25.226
    permit icmp any any echo-reply
    permit icmp any any time-exceeded
    permit icmp any any packet-too-big
    permit icmp any any traceroute
    permit icmp any any unreachable
    deny   ip any any
    deny   icmp any any
    ip access-list extended gre-tunnel-list
    permit gre host 96.###.25.226 host 184.###.###.254
    permit gre host 96.###.25.226 host 70.###.172.142
    logging host 10.100.###.254
    logging host 10.100.###.246
    snmp-server community P_RW RW
    snmp-server community P_RO RO
    snmp-server community a RW 20
    snmp-server community r RO 20
    snmp-server community a RW 20
    snmp-server community r RO 20
    snmp-server enable traps entity-sensor threshold
    snmp-server host 10.100.###.246 public
    snmp-server host 10.100.###.254 public
    access-list 20 permit 10.###.9.3
    access-list 20 permit 10.###.8.16
    access-list 20 permit 10.100.###.249
    access-list 20 permit 10.100.###.254
    access-list 20 permit 10.100.###.246
    control-plane
    banner motd ^CCCCCC
    ****************** Warning! Warning! Warning! ********************
    This system is restricted to authorized users for business
    purposes.  Unauthorized access is a violation of the law.  This
    service may be monitored for administrative and security reasons.
    By proceeding, you consent to this monitoring
    ****************** Warning! Warning! Warning! ********************
    ^C
    line con 0
    login local
    line aux 0
    line 2
    no activation-character
    no exec
    transport preferred none
    transport input all
    transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
    stopbits 1
    line vty 0 4
    exec-timeout 60 0
    password 7 *removed*
    login local
    transport input ssh
    line vty 5 15
    exec-timeout 60 0
    password 7 *removed*
    login local
    transport input ssh
    scheduler allocate 20000 1000
    ntp server 10.###.8.8 prefer
    ntp server 10.###.231.200 prefer
    ntp server 10.###.8.69
    ntp server 10.###.1.6 prefer
    end

    UPDATE
    I have since applied the following config to the tunnel interfaces:
    ip mtu 1400
    ip tcp adjust-mss 1400
    tunnel path-mtu-discovery
    This worked and I was able to reset each users PC to default MTU size of 1500, but only until just now. I got a call from a user who explained that he wasn't able to reach some websites, again.
    Sure enough, I've just confirmed that all of the users are unable to access the websites any longer.
    This is crazy, does anyone have any ideas?

Maybe you are looking for

  • Error when trying to book an iPhone in for service (addrapi.08)

    Hi all, I've been trying to book an iPhone in for service via the Apple Support site for a few weeks now because my nearest Apple store is about an hour and a half away. Every time I try and do this I get this error after clicking continue after doin

  • J2IUN only showing PLA Amount balance all NIL

    Hi, We are in the implementation phase. IN J2iun, only PLA amount is displayed wheras all others are showing 0.00 Can u suggest what cud be missing in that. I searched forum for similar posts and it says extract register from J2i5, and I did that but

  • Problem with connecting my Ipod Classic 80 gb to a Phillips Portable DVD

    I just purchased a Phillips Portable DVD player that I can insert my ipod into. It plays music, but everytime I go to play a movie it keeps coming up withTV OUT ENABLED, PLEASE CONNECT VIDEO ACCESSORY. I have set all the proper settings TV OUT - ON T

  • Communication error with the LOCAL_EXEC Function BAPI_PTMGREXTATTABS_CHECK

    Hello, We use timesheet (CATS) in a separate SAP system from the SAP system in which HR resides. I found out how the loosely coupled scenario with CATS works with a SAP HR system. We transfer the workschedule and absence data with report RPTIMEOVERVI

  • Initialization order inconsistency with override

    Initialisation order is inconsistent depending on whether a variable is overridden or not. Two questions - 1. Is this supposed to be the case, or is it a bug? 2. If it is supposed to be the case, why did Sun decide to make it work like that? For exam