Resize Width of the frame in BrowserBasedHelp

Hi for All,
How can I do to resize the "width" of the frame as described in the example picture? The frame I want to increase the size is represented with a number (1) in the image.
Regards,
Christian

Hi there
Jeff gave you the information for WebHelp or FlashHelp and both of those are "browser based". Am I correct in assuming from your response that you are using the "Browser Based" version of AIR Help?
If that's the case, I'm not sure I've ever seen anyone document how to modify that.
Cheers... Rick
Helpful and Handy Links
RoboHelp Wish Form/Bug Reporting Form
Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95!
Adobe Certified RoboHelp HTML Training
SorcererStone Blog
RoboHelp eBooks

Similar Messages

  • Text wrap for a paragraph: How to define the width of a Text box /  active text area? I simply need a longish text to wrap within the frame!

    Hello, I've been searching for a good while in the forums now, but have found no solution or real mention of the problem – I hope some of you can help.
    I want to very simply layout a text between scenes, a slightly longer text that wraps within the frame margins. Here's an example of how I want it to look:
    Now, I couldn't for the life of me get the Custom Text to behave like that, as there are no parameters to set for the width of the text area. The Text Size, yes, along with the Tracking, Baseline and all that, but the width of the text box, no. The above was created by customizing one of the other Text Generator presets that happened to be left aligned.
    However, this preset has a fade in/fade out transition, which I do not want. There's no way to remove this transition as it seems integrated into the Text Generator (meaning they are not really presets, but separate kinds of Text objects? Very silly.)
    So I am asking you: Is there any way to get the Custom Text generator to behave like that? Just a text paragraph as above. Below you'll see all I can manage with the diffferent Custom Text parameters. Any kind of repositioning and resizing of the text just changes the position and size of the frame – but the actual text items are just cropped off where they extend out of that frame. Apparently the bounding box for the text is just some default length, and I can't find any way to adjust the width. See below my different attempts.
    The same text pasted into a Custom Text generator clearly extends outside the frame:
    Here Transform just moves – or resizes – the video frame that the Text Box exists inside:
    The Crop gives similar results, and of course Distort doesn't get me closer to what I need, either. There should be simply a Text Box Width parameter to set somewhere, but if it exists they have hidden it very well. How do you do it?
    Thanks for any help, this is a silly problem, but one of now many trivial problems that amount to me growing quite dissatisfied with FCPX. Hopefully I've just overlooked something.
    All the best,
    Thomas

    Thomas...same kind of crap here.
    I used Custom Text - entered a sentence, hit return, entered another.
    Set to 72 pt.
    The default alignment is centred - I want left aligned text...the text start point stays at the centre of frame and the sentence runs off the edge of the bounding box.
    There is no settings in the Text or Title inspector dialog to correct that!
    Using Transform will not sort it!

  • How can I scale just one dimension of a pic? I need to shrink the width only, to fit the frame.

    HELP!  How can I shink only one dimension?  I need to shrink the width slightly to fit the frame; the program only allows scaling that is proportional, so when I shrink the width the heigh becomes too short.  Father Mike

    I'd recommend using the rectangular marquee and the crop command. This will crop the image to an exact size without any resampling or distortion. Cropping without constraint can cause distortion...like giving someone a cone head.
    Check the size of the image first by either looking in the Image<Resize<Image Size. Make a notation of the height since you don't want to change that in this case. (While you are there, change the resolution to the desired output...make notation of height after this step if you changed the resolution.)
    Select the Rectangular Marquee tool. Change the setting in the options bar to "Fixed Size" and input the desired size. (Along with the numbers, specify in this box in what units you desire...px, in, etc.
    Drag the marquee to the desired location. (As long as the marquee tool is selected, this selection box can be moved around).
    Go up to the menu bar and select Edit<Crop.
    Reading material on Image<Resize<Image Size:
    http://help.adobe.com/en_US/PhotoshopElements/7.0_Win/WSae2ea3b149d0c3591ae939f103860b3d59 -7ee8.html
    Reading material on Crop Command:
    http://help.adobe.com/en_US/PhotoshopElements/7.0_Win/WSae2ea3b149d0c3591ae939f103860b3d59 -7eed.html

  • Panel doesn't display properly until I resize the frame

    Hiya folks,
    I'm currently trying to write a simple piece of music notation software. This is my first time using swing beyond a relatively simple JApplet and some dialog stuff. Anywho, I ran into a pretty discouraging issue early on. So far I've got a frame with a menu bar and a toolbar on the bottom border. The toolbar contains a button which should draw a new staff panel containing 11 panels (potentially more) within it, alternating between lines and spaces. Sort of like this:
    import javax.swing.*;
    import java.awt.*;
    public class Staff extends JPanel {
       private static JPanel nsp1,nsp3,nsp5,nsp7,nsp9,nsp11;
       private static JPanel nsp2,nsp4,nsp6,nsp8,nsp10;
       private ImageIcon image= new ImageIcon(this.getClass().getResource( "icons/treble clef.gif"));
        public Staff(){
        setLayout(new GridLayout(11,1));
        add(nsp1= new NoteSpace());
        add(nsp2= new LineSpace());
        add(nsp3= new NoteSpace());
        add(nsp4= new LineSpace());
        add(nsp5= new NoteSpace());
        add(nsp6= new LineSpace());
        add(nsp7= new NoteSpace());
        add(nsp8= new LineSpace());
        add(nsp9= new NoteSpace());
        add(nsp10= new LineSpace());
        add(nsp11= new NoteSpace());
    static class NoteSpace extends JPanel{
        public NoteSpace(){
        setPreferredSize(new Dimension(this.getWidth(),2));
    static class LineSpace extends JPanel{
          public LineSpace(){
          setPreferredSize(new Dimension(this.getWidth(),1));
          public void paint(Graphics g) {
              super.paint(g);
              g.drawLine(0, (int) super.getHeight()/2, (int)super.getWidth(), (int)super.getHeight()/2);
    }Anyway, this panel displays as a tiny box wherein nothing is visible until I resize the frame. Really frustrating. And I have have no idea what the problem might be. Here's the actionlistener:
    jbtcleff.addActionListener(new ActionListener (){
            public void actionPerformed (ActionEvent e){
                staff.setBounds(50,panel.getHeight()/2,panel.getWidth()-50,panel.getHeight()/2);
                panel.add(staff);
                staff.repaint();
            });...which is located in a custom jtoolbar class within the Main class, an extension of JFrame:
    public class Main extends JFrame{
       JMenuBar jmb=new CustomMenuBar();
       JToolBar jtb= new CustomToolBars("ToolBar");
       static boolean isStaff=false;
       static boolean isNote=false;
       static JPanel panel = new JPanel();
       private static Staff staff= new Staff();
        private static Toolkit toolkit= Toolkit.getDefaultToolkit();
       private static Image image=toolkit.getImage("C:/Users/tim/Documents/NetBeansProjects/ISP/src/MusicGUI/icons/treble clef.jpg");
        private static Cursor noteCursor = toolkit.createCustomCursor(image,new Point(0,0),"Image"); 
       public Main (String m) {   
            super(m);
            setJMenuBar(jmb);    
            getContentPane().add(jtb,BorderLayout.SOUTH);       
            panel.setLayout(new CardLayout(60,60));
            getContentPane().add(panel);
    public static void main (String[]args){
            JFrame frame= new Main("Music");
            frame.setSize(800,400);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
            frame.setIconImage(image);
           Sorry for all the code. I'm desperate.
    Thanks!

    Oh my... have you been through the Swing tutorial?
    Let's look at some of your code,
    static class NoteSpace extends JPanel{
        public NoteSpace(){
        setPreferredSize(new Dimension(this.getWidth(),2));
    static class LineSpace extends JPanel{
          public LineSpace(){
          setPreferredSize(new Dimension(this.getWidth(),1));
          public void paint(Graphics g) {
              super.paint(g);
              g.drawLine(0, (int) super.getHeight()/2, (int)super.getWidth(), (int)super.getHeight()/2);
    }Here, NoteSpace and LineSpace are being set to a preferred size of 0x2 pixels, and 0x1 pixels respectfully. If you want them at 0 width, how do you expect them to show? In particular, NoteSpace isn't doing anything special. It's just a panel. Why an inner class? Lastly you should not override paint() for SWING. That's AWT stuff. For Swing, you override paintComponent(Graphics g) .
    Then we have this
    jbtcleff.addActionListener(new ActionListener (){
            public void actionPerformed (ActionEvent e){
                staff.setBounds(50,panel.getHeight()/2,panel.getWidth()-50,panel.getHeight()/2);
                panel.add(staff);
                staff.repaint();
            });I'm not sure what the variable jbtcleff is, but it seems you are adding your Staff panel to "panel" every time a button is pressed.... why? Why not just add it once (outside the action listener) and be done with it. Your panel object has a CardLayout, so I assume you meant to create a new+ staff panel everytime a button is pressed, and then add it to the card layout panel. Even so, setBounds(...) does not seem pertinant to this goal. (In fact, in most situtations the use of setBounds(...) is the antithesis of using layout managers).
    The problem you mentioned though seems to be related to the use of a JPanel (your Staff class) that adds zero-width compontents to a grid array.

  • HELP!!! JTextArea keeps resizing to the size of the frame i have it on!!!1

    I have a Frame that has a panel with a JTextArea in it, but when the text area is displayed (regardless of what size i declare it ) it resizes itself to the size of the frame .. Anbody that can telkl me why it does this, thanks in advance ; )

    okay, i'm back from lunch. maybe this will give you some ideas. i added borders so you could see the outline of the scroll pane as opposed to the top panel which i'm thinking should be called left panel since you have it to the west. it's not meant to represent the best design, only to demonstrate some thoughts.
    import javax.swing.*;
    import java.awt.BorderLayout;
    import java.awt.event.*;
    public class MyFrame extends javax.swing.JFrame {
       private JPanel panel;
       private JScrollPane scroll;
       private JTextArea area;
       /** Creates a new instance of MyFrame */
       public MyFrame() {
          init();
       private void init(){
          setTitle("My Frame");
          panel = new JPanel();
          panel.setBorder(BorderFactory.createTitledBorder("my panel"));
          area = new JTextArea();
          area.setLineWrap(true);
          area.setWrapStyleWord(true);
          area.setRows(15);
          scroll = new JScrollPane(area);
          scroll.setBorder(BorderFactory.createTitledBorder("my scroll"));
          panel.add(scroll);
          getContentPane().add(panel,BorderLayout.WEST);
          setSize(400, 400);
          setLocationRelativeTo(null);
          addWindowListener(new WindowAdapter(){
             public void windowClosing(WindowEvent we) {
                System.exit(0);
          String tmp = "here is some text to test an area";
          for(int i=0;i<50;i++)
             area.append(tmp);
       public static void main(String[] args) {
          new MyFrame().setVisible(true);
    }

  • How to resize everything on the stage in all frames

    Is it possible to resize everything on the stage in one (or a few) step? I know scaling the movie has the same result, but when working in Flash it's a lot easier when you see the actual size.

    If you have done all your animations avoiding actionscript, then you can select multiple frames and layers via the timelines "edit multiple frames" icon

  • Problem with dragged component after resizing the frame

    My application is simple: I am displaying an image on a panel inside a frame (JFrame). I am able to drag the image inside the panel. My problem is that, after dragging the image around, if I am resizing the frame, the image goes back to its original position.
    Does anyone know a workaround?
    I have been using the sample provided by noah in his answer (reply no. 3) to a previous question on this forum: http://forum.java.sun.com/thread.jsp?forum=57&thread=126148
    Thank you!

    Chek out the visibility of your components. Some operations may render them invisible. Use the setVisible( boolean ) to make them visible.

  • I made a imovie out of a group of photos and added music. When I burned to DVD on iDVD and played back the disc all of the photos were larger than the frame could accommodate and the sides were cut off. I also tried resizing from 16 9 to 4 3 and no better

    I made and iMovie out of a group of photos and added music. When I burned to I DVD the pictures came out to wide to fit into the frame. I tried again by changing the size from 16 9 to 4 3 and it didn't make any difference. Would going to share to browser rather than directly to share to IDVD make a difference?

    What do the photos look like if you play the movie within iMovie?  Sounds like adjusting Ken Burns would help.

  • Does not allow to increase width of the filed

    hi all,
    well i have report that is designed by someone else in report 6i, now i want to change the width of one filed , that is i want to increase width but it does not allow me to change it
    how to change it??
    thanks
    abhi.

    There can be two reasons...
    1. Check the outer frame(s) for that field. I mean if that field exists in repeating frame or main frame then increase the frame size first then you can increase the field side.
    2. There is one button in the LAYOUT SECTION at top called FREEZE PANES. If it is pressed mean if you will resize the field size then frame side will be automatically adjust. So, suppose you replay LAYOUT section's size is not allowing you yo increase the frames out of the LAYOUT section. If it is then increase the layout section size and try..
    -Ammad

  • How to set the size of the frame in the decoration controls

    Hi,
    I am drawing some frames or boxes using the patterns in the "Decorations" control in labview.
    Is there other way to set the size of the frames or boxes rather than to drag them? also how can I change the color of the borders?
    Thanks,
    Joyce
    Solved!
    Go to Solution.

    Select the item.  Go to the Resize Objects button on the toolbar.  Pick the last one which shows a resize within a dialog bubble.  Now a dialog pops up which lets you define the height and width.
    To color something, Shift right click to bring up the toolbox.  Pick the paint brush.  Click on the thing you want to change such as the border.  It might now be the wrong color, so right click which brings up the color picker.  Now select the color you actually want.  If you want something to be transparent, pick the T at the upper right corner of the color dialog box.

  • Hint on resizing components with the window

    Hi,
    I'm making a web browser and am having a bit of trouble getting the componenets inside ( a JSpliPane with various bits in it) and the top buttons to resize with the main frame when it is resized. At the moment it all stays in the top left at the same size.
    I would like it for the menu to just expand width ways and the JSplitPane to rezise fully to take ip the rest.
    Any ideas on where to start, I have an idea that it may be layout managers, but i cant seem to see how to get one to do this.
    Any pointers would be appreciated cheers (I will happilly look up the API if someone could tell me where to start).
    Cheers :)

    Use a LayoutManager, more specifically BorderLayout.
    JFrame f = new JFrame();
    f.getContentPane().setLayout(new BorderLayout()); //BorderLayout is the default layoutmanager
    f.getContentPane().add(myContentPane, BorderLayout.CENTER);And that's it...

  • How to adjust the width of the accordion widget

    I'm builting my 2nd wesbite with Muse and cannot find a way to decrease the width size of the accoidion widget to fit my grid. When I try to decrease it it just "jumps" back to its original spot. 
    I may be going crazy but I can't seem to find any information on this in the forums. I'm sure it's a simple fix I just cannot find it. Any help would be appreciated!

    Reduce the width of the inner most container which is the usually the Text frame for each of the panels. Then you would be able to resize the width of the overall Accordion. Its just that the width of the Content Area cannot be less than that of the Text Frame inside.
    Thanks,
    Vinayak

  • Panels resizable contained in a frame resizable

    Hello to all,
    I have the following question, how is it possible to make resizable the panels contained in the frame when frame's resized by the user?
    I had already a look at the swing tutorial but I didn't find the solution :( (may be I didn't understand )
    Can anybody help me?
    I attach here bellow my code
    Thansk in advance
    Mandy
    ublic class SecondClass  extends JFrame{     
         JTextArea cfgArea;
         JTextArea relArea;
         JTextArea resultArea;
         JComboBox searchModeCB;
         public SecondClass(){
             JFrame frame = new JFrame("title");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             frame.setResizable(true);
             JPanel mainPanel = new JPanel();
             mainPanel.setBackground(Color.cyan);
             mainPanel.setSize(600,400);
             mainPanel.setLayout(null);
             JPanel  cfgPane = new JPanel ();
             cfgPane.setLayout(null);
             cfgPane.setBackground(Color.red);
             cfgPane.setBounds(10,10,370,280);
             mainPanel.add(cfgPane);
             cfgArea = new JTextArea();
             cfgArea.setBorder(BorderFactory.createEtchedBorder());
             cfgArea.setDragEnabled(true);
             cfgArea.setTransferHandler(new CustomedTransferHandler());
             cfgArea.setDropMode(DropMode.INSERT);
             JScrollPane cfgScrollPane = new JScrollPane(cfgArea);
             cfgScrollPane.setBounds(10, 20, 350, 200);
             cfgPane.add(cfgScrollPane);
             JButton clearCfgButton = new JButton("Clear");
             clearCfgButton.setBounds(70, 230, 70, 20);
             cfgPane.add(clearCfgButton);
             JButton addCfgButton = new JButton("Add");
             addCfgButton.setBounds(200, 230, 60, 20);
             cfgPane.add(addCfgButton);
             mainPanel.add(cfgPane);
             JPanel relPane =  new JPanel();
             relPane.setLayout(null);
             relPane.setBackground(Color.blue);
             relPane.setBounds(10,300,370,280);
             mainPanel.add(relPane);
             relArea = new JTextArea();
             relArea.setBorder(BorderFactory.createEtchedBorder());
             relArea.setDragEnabled(true);
             relArea.setTransferHandler(new CustomedTransferHandler());
             relArea.setDropMode(DropMode.INSERT);
             JScrollPane relScrollPane = new JScrollPane(relArea);
             relScrollPane.setBounds(10, 20, 350, 200);
             relPane.add(relScrollPane);
             JButton clearRelButton = new JButton("Clear");
             clearRelButton.setBounds(20, 230, 70, 20);
             relPane.add(clearRelButton);
             JButton addRelButton = new JButton("Add");
             addRelButton.setBounds(110, 230, 60, 20);
             relPane.add(addRelButton);
             String[] items = {"Something"};
             searchModeCB = new JComboBox(items);
             searchModeCB.setBounds(180, 230, 180, 20);
             searchModeCB.setSelectedItem("Something");
             relPane.add(searchModeCB);
             JButton okRelButton = new JButton("Ok");
             okRelButton.setBounds(300, 255, 60, 20);
             relPane.add(okRelButton);
             JPanel resultPane = new JPanel();
             resultPane.setLayout(null);
             relPane.setBackground(Color.yellow);
             resultPane.setBounds(390,10,580,570);
             resultArea = new JTextArea();
             resultArea.setBorder(BorderFactory.createEtchedBorder());
            mainPanel.add(resultPane);
             JScrollPane resultScrollPane = new JScrollPane(resultArea);
             resultScrollPane.setBounds(10, 20, 560, 490);
             resultPane.add(resultScrollPane);
             JButton clearResButton = new JButton("Clear");
             clearResButton.setBounds(120, 520, 80, 20);
             resultPane.add(clearResButton);
             JButton saveResultButton = new JButton("Save");
             saveResultButton.setBounds(380, 520, 80, 20);
             resultPane.add(saveResultButton);
             JButton exitButton = new JButton("Exit");
             exitButton.setBounds(495, 550, 80, 15);
             resultPane.add(exitButton);
             frame.add(mainPanel);
             frame.setLocation(200,200);
             int width = 980;
             int height = 650;
             frame.setSize(width, height);
             frame.setVisible(true);
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              SecondClass main = new SecondClass();
    }

    ok did some modifications.
    Now it works as I want
         public SecondClass(){
             JFrame frame = new JFrame("title");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             frame.setResizable(true);
             JPanel  mainPanel = new JPanel ();
             mainPanel.setSize(600,400);
             mainPanel.setLayout(new GridLayout(0,2));
             JPanel sxPanel = new JPanel();
             sxPanel.setBackground(Color.blue);
             sxPanel.setLayout(new GridLayout(2,0));
             mainPanel.add(sxPanel);
             JPanel dxPanel = new JPanel();
             dxPanel.setLayout(new BorderLayout());
             mainPanel.add(dxPanel);
             // Create cfgArea
              JPanel  cfgPane = new JPanel ();
              cfgPane.setLayout(new BorderLayout());
             sxPanel.add(cfgPane);
             cfgPane.add(new JLabel("  "),BorderLayout.NORTH);
             cfgPane.add(new JLabel("  "),BorderLayout.EAST);
             cfgPane.add(new JLabel("  "),BorderLayout.WEST);
             cfgArea = new JTextArea();
             cfgArea.setBorder(BorderFactory.createEtchedBorder());
             cfgArea.setDragEnabled(true);
             cfgArea.setTransferHandler(new CustomedTransferHandler());
             cfgArea.setDropMode(DropMode.INSERT);
             JScrollPane cfgScrollPane = new JScrollPane(cfgArea);
             cfgPane.add(cfgScrollPane,BorderLayout.CENTER);
             JPanel southCfgPanel = new JPanel();
             cfgPane.add(southCfgPanel, BorderLayout.SOUTH);
             JButton clearCfgButton = new JButton("Clear");
             southCfgPanel.add(clearCfgButton);
             JButton addCfgButton = new JButton("Add");
             southCfgPanel.add(addCfgButton);
             //end og cfg Area
             // Create relArea     
             JPanel relPane =  new JPanel();
             relPane.setLayout(new BorderLayout());
             sxPanel.add(relPane);
             relPane.add(new JLabel("  "),BorderLayout.NORTH);
             relPane.add(new JLabel("  "),BorderLayout.EAST);
             relPane.add(new JLabel("  "),BorderLayout.WEST);
             relArea = new JTextArea();
             relArea.setBorder(BorderFactory.createEtchedBorder());
             relArea.setDragEnabled(true);
             relArea.setTransferHandler(new CustomedTransferHandler());
             relArea.setDropMode(DropMode.INSERT);
             JScrollPane relScrollPane = new JScrollPane(relArea);
             relPane.add(relScrollPane,BorderLayout.CENTER);
             JPanel southRelPanel = new JPanel();
             relPane.add(southRelPanel, BorderLayout.SOUTH);
             JButton clearRelButton = new JButton("Clear");
             southRelPanel.add(clearRelButton);
             JButton addRelButton = new JButton("Add");
             southRelPanel.add(addRelButton);
             String[] items = {"Something"};
             searchModeCB = new JComboBox(items);
             searchModeCB.setSelectedItem("Something");
             southRelPanel.add(searchModeCB);
             JButton okRelButton = new JButton("Ok");
             southRelPanel.add(okRelButton);
            //RESULT PANEL
             JPanel resultPane = new JPanel();
             resultPane.setLayout(new BorderLayout());
             dxPanel.add(new JLabel("  "),BorderLayout.NORTH);
             dxPanel.add(new JLabel("  "),BorderLayout.EAST);
             dxPanel.add(new JLabel("  "),BorderLayout.WEST);
             dxPanel.add(resultPane,BorderLayout.CENTER);
             resultArea = new JTextArea();
             resultArea.setBorder(BorderFactory.createEtchedBorder());
             resultPane.add(resultArea,BorderLayout.CENTER);
             JScrollPane resultScrollPane = new JScrollPane(resultArea);
             resultPane.add(resultScrollPane);
             JPanel southPanel = new JPanel();
             resultPane.add(southPanel, BorderLayout.SOUTH);
             JButton clearResButton = new JButton("Clear");
             southPanel.add(clearResButton);
             JButton saveResultButton = new JButton("Save");
             southPanel.add(saveResultButton);
             JButton exitButton = new JButton("Exit");
             southPanel.add(exitButton);
             frame.add(mainPanel);
             frame.setLocation(200,200);
             // Show the frame
             int width = 980;
             int height = 650;
             frame.setSize(width, height);
             frame.setVisible(true);
         }

  • Resize events and bad frame location

    Hi
    I'm writing an application with a main frame and a non-modal
    dialog. I'd like to keep the two windows at the same distance
    so I've to know when the user moves the main frame or resizes
    it. I've added a ComponentListener to the main frame and ...
    I've noticed a strange behaviour when I receive resize events.
    While I'm dragging the left edge of the main frame, resizing
    it, the method getBounds returns always the old location:
    only the frame size changes.
    I can't understand where is the mistake!
    I'm using the Sun JDK 1.5.0_06 under Suse Linux 9.3 Pro.
    Thanks and Regards
    import java.awt.event.ComponentAdapter;
    import java.awt.event.ComponentEvent;
    import javax.swing.JFrame;
    public class ResizeTest extends ComponentAdapter {
         public ResizeTest() {
              super();
              mainFrame = new JFrame("Test Frame");
              mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              mainFrame.setBounds(100, 100, 400, 200);
              mainFrame.addComponentListener(this);
         public void setVisible(boolean visible) {
              mainFrame.setVisible(visible);
         public void componentResized(ComponentEvent e) {
              System.out.println(mainFrame.getBounds());
         public static void main(String[] args) {
              ResizeTest testFrame = new ResizeTest();
              testFrame.setVisible(true);
         private JFrame mainFrame;
    }

    I've just made some tests.
    Using both JRE 1.5.0_06 and JRE 1.4.2_08 on my Suse
    Linux workstation, only "width" value changes.
    Using JRE 1.5.0_04 on Windows XP, it works. Only one
    resize event has been sent (at the end of the drag
    phase), however ... bounds are correct.
    Yes, it seems a version/platform issue.
    Thanks a lot.

  • How to make a JPanel containing buttons  take up the width of the window?

    I'm creating a GUI and I have a button group that I want to be the width of the window. I have another JPanel on the same window that doesn't have a button group in it and it takes up the width of the window. I don't think I'm doing anything differently creating the two, but I need consistency.
    The best way I can explain this is with code, so I created an example of what I am doing here:
    import java.awt.*;
    import javax.swing.*;
    public class test extends JFrame {
         public test() {
              JPanel win = new JPanel();
              JPanel buttonsPanel = new JPanel();
              JPanel statusPanel = new JPanel();
              win.setLayout(new BoxLayout(win, BoxLayout.Y_AXIS));
              buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.Y_AXIS));
              statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.Y_AXIS));
    //          createRadioButtonsPanel
              ButtonGroup buttons = new ButtonGroup();
              JRadioButton currentMap = new JRadioButton("option1", true);
              JRadioButton newMap = new JRadioButton("option2");
              JRadioButton noMap = new JRadioButton("option3");
              buttons.add(currentMap);
              buttons.add(newMap);
              buttons.add(noMap);
              buttonsPanel.add(currentMap);
              buttonsPanel.add(newMap);
              buttonsPanel.add(noMap);
              buttonsPanel.setBorder(
                        BorderFactory.createTitledBorder("Create: "));
    //           createStatusPanel
              JLabel statusLabel = new JLabel("Loading...");
              statusLabel.setBorder(BorderFactory.createLoweredBevelBorder());
              statusLabel.setPreferredSize(new Dimension(400,20));
              statusLabel.setMinimumSize(new Dimension(400,20));
              statusLabel.setMaximumSize(new Dimension(400,20));
              statusPanel.add(statusLabel);
              JPanel statusButtons = new JPanel(new FlowLayout(FlowLayout.RIGHT));
              JButton pauseSearch = new JButton("Pause");
              JButton cancelSearch = new JButton("Cancel");
              statusButtons.add(pauseSearch);
              statusButtons.add(cancelSearch);
              statusPanel.add(statusButtons);
              statusPanel.setBorder(BorderFactory.createTitledBorder("Status: "));
              win.add(buttonsPanel);
              win.add(statusPanel);
              getContentPane().add(win);
              pack();
              setVisible(true);
         public static void main(String args[]) {
              test s = new test();
    }When I compile and run this class I get this window:
    http://img136.imageshack.us/img136/1538/exampleek5.png
    You see how on the bottom, "Status" JPanel takes up the entire width of the window? When the window is resized, the border is also resized. I would love to have the top "Create" JPanel have the same behavior. How do I do this?
    Thanks in advance!

    It can get confusing when using the BoxLayout. The box layout takes into consideration the X alignment of the components as well as the minimum and maximum lengths.
    So I suggest you read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html]How to Use Box Layout for examples and explanations on how these values are used in the layout process.
    It may be easier to use a BorderLayout for the high level layout manger, since it will resize a components width when added to the NORTH, CENTER or SOUTH.

Maybe you are looking for

  • Calculation in Alv Report

    Hi SDN's I need to calculate Total(Cost1Cost2Cost3 = Total) in my alv report Date          Acc.no  Doc.Typ   Cost1  Cost2  cost3   Total 20061206   123        GG         121     23        45       ???? 20070203   405         BL         234     67    

  • How to find the Workbook statistics.

    Hi Experts, Can anyone please tell me how to find the Workbook statistics. There are more 20 workbooks created from a single query. I want to find out the top 3 workbooks accessed frequently for 1 year. Please provide your valuable inputs. Thanks

  • Sequence or Table

    Hi there, I've a table with (YEAR,SEQNO) as pk.The sequence must be restarted at the beginning of each year. This will be accessed very often by a lot of users at the same time. There are (at least) 2 ways of doing this: a) I can create a table with

  • The thread only shows the first message

    Hi everybody, I already had this problem once before. Now I got another occurrence of that problem - from my threads I see that there is a new message in the thread I participated yesterday. I open it and I only see a single first message not all oth

  • Cannot install Pages onn iPad 2?

    I tried installing Pages on my iPad 2, and it says that the app required iOS 5.1. Do I not have the required software on the iPad 2? But here it says that the app works on all iPads...?