Automatic Resizing Problems

I am having serious troubles with my components resizing automatically when the window is resized or the contents within the component change. Namely, tree and list components. Every time I add an element to a tree or list component, the container that the tree or list is placed in resizes to match the longest element within the tree or list. I have researched my Pure JFC Swing book from cover to cover trying to find a fix for this, and have had no luck. Can somebody help me remedy this problem?

Ok, I haven't added anything to exit the system when you close the window. Also, I have chosen not to repeat any code for a JTree at all. It would take too long. This is code for a JList component. Try entering a really long e-mail and also a short one.
class NameFrame extends JFrame{
     Container contentPane = getContentPane();
     public NameFrame(String title, int w, int h){
          super(title);
          setSize(w,h);
          contentPane.add(new NamePanel());
class NamePanel extends JPanel implements ActionListener{
     JList list;
     JTextField email;
     JButton addButton;
     Container contentPane = getContentPane();
     Vector listData = new Vector();
     public NamePanel(){
          addButton = new JButton("Add");
          addButton.addActionListener(this);
          addButton.setActionCommand("Add");
          add(addButton);
          email = new JTextField("", 20);
          add(email);
          list = new JList();
          list.setVisibleRowCount(4);
          list.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
          list.setSelectionBackground(Color.blue);
          list.setSelectionForeground(Color.white);
          list.addListSelectionListener(this);
          JScrollPane sp = new JScrollPane(list, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
          add(sp);
     public void actionPerformed(ActionEvent ae){
          String but = ae.getActionCommand();
          if(but.equals("Add")){
               listData.addElement(email.getText());
               list.setListData(listData);
               email.setText("");
class A{
     public static void main(String[] args){
          NameFrame nf = new NameFrame();
          nf.show();
Then, click the window and watch it re-size to match the longest one. I don't like this, I would like to keep it the same size at all times no matter what size e-mail is entered.
Your dilligence is greatly appreciated....

Similar Messages

  • Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?

    Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?
    I use the Tools > Annotate > Add Text feature, and when I click away after adding text, it automatically changes the text box size such that the last letter -- or last word -- gets bumped off into an invisible line below it, forcing me to manually adjust every single text box. It is highly annoying when trying to complete PDF forms (e.g. job applications).
    It appears to be a glitch, quite honestly, an error resulting from Apple's product design. Has it been fixed in the new operating system (for which they want $30)?
    I would very much appreciate any help you can provide! Thank you for your time.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Neither Automatically Resize nor Zoom to Fit working

    Hello out there in Appleland,
    Neither Automatically Resize nor Zoom to Fit is working in Preview 5.0.3 under Snow Leopard.  Zoom to Fit acts just like Actual Size or <Command> 0 and Automatically resize doesn't work at all.  This must be and bug, so please explain how this can be permanently fixed, even at the command line level.
    Thank you.
    Best regards,
    Bob
    Denver, CO

    I've found out a little more about Preview and its bug through a process of elimination.
    After examining Automatically Resize for Preview 3.0.9 on my old PowerBook G4 with OS 10.4.11, Preview 4.1 on my iMac with OS 10.5.8, and now Preview 5.0.3 on my MacBook Pro with OS 10.6.8, I discovered they all work the same way.  When Automatically Resize is checked the image is only resized when the window is reduced but never when the window is enlarged to a size greater than the image's Actual Size, which is a worthless feature for smaller images.  I don't think this is the way it is supposed to work, but I may be wrong.
    Where 5.0.3 differs from the other versions of Preview is in Zoom to Fit.  Under the View Menu, Zoom to Fit is grayed out unless the image stretches beyond the borders of the window (i.e. Automatically Resize toggled off).  In this case, the image will be reduced to the size of the window when Zoom to Fit is selected.  On the other hand, if the image is smaller than the size of the window, Zoom to Fit is not grayed out but neither does it enlarge the image to the size of the window when selected.  In other words, Zoom to Fit in 5.0.3 is only good for reducing an image to fill a smaller window but never for enlarging an image to fill a bigger window if that window is larger than the Actual Size of the image.
    Perhaps the problem is with Preview 5.0.3 failing to access com.apple.Preview.ImageSizingPresets.plist since removing all the Preview plists and launching the application anew does not recreate this particular plist.  Also, the modified date on the original com.apple.Preview.ImageSizingPresets.plist never seems to change.
    This is a damned annoying bug and should have been fixed when Snow Leopard was the standard.  In my opinion, the fact that this wasn't caught reveals Apple's slipping standards and a concentration on their growing market in mobile devices.  I feel I have a right to say this since I've been a loyal Mac user since the early 1980s.
    For those who suggest I move to Lion or beyond, you can keep the economy going with your new software purchases.  For now, I'm going to continue using Rosetta and my old, third-party applications in Snow Leopard.

  • Iphoto is automatically resizing all my pics

    after i edit my photos on iphoto, i like to post them on my blog, or send them to a friend. however, i've noticed that wherever i upload, and however i send them, they are automatically resized to a pretty small size. but when i view them on iphoto, they are at normal resolution and cover my entire screen. i don't have a problem with everything already being resized for me before i post online, that actually saves tons of time, but i was wondering where/how these settings can be adjusted so i can have larger resized pictures.

    There are a couple of places where you can set the image size when sharing your photographs. If you would like to email larger or even FULL-SIZE images, go through the normal process of emailing: 1) Select photos 2) Click Email button at bottom of window. When the dialog window comes up for email settings, there is a popup menu that allows you to pick three scaled sizes or actual size.
    Another option for exporting your photos is of course the Export function, which you get from the File menu. This will give you a dialog that allows you to select the size of the export image.
    When you export to iWeb's blog template, your image is scaled to the size of the image placeholder on the blog page. What's the secret of larger photos there? Well it is a bit tricky, but once you figure it out, it isn't so bad.
    1) Go to the blog page on which your photo appears. The photo will appear at the top of the page and have a frame around it.
    2) Select the frame around the image first. Click it "i" icon to bring up the inspector palette. Click on the little ruler icon on the inspector. There is a checkbox on the palette that says "Constrain proportions" You want to turn this off, so that you can resize one dimension if need be.
    3) Now select the actual image. If you want to size a single dimension, repeat the process you used in step 2 on the image frame. Note that the placeholder will distort the image if you stretch the image along one dimension. This is not a bad thing... you can fix this pretty easily.
    4) If you distorted the image in step 3 because of your desire of a different sized image frame, first press the Media button at the bottom of the window in iWeb.
    5) Scroll through and find the original image that you had exported from iWeb and that first showed up on the blog page.
    6) Drag that image into the placeholder and it will replace the stretched image, properly scaled and cropped.
    There ya go!
    If you find this helpful, or if it solves your issues, please indicate this by clicking in the appropriate icon in the header of this reply.

  • Preview Application Resizing Problem

    Preview Application Resizing Problem
    Microsoft platforms have two significant advantages. The first is the concept of an operating system that can function with hardware that ranges from cellular phones to desktop computers. The second is that Microsoft has excellent software development tools
    for creating and testing computer programs.
    Software compatibility across hardware platforms requires not only meeting CPU and memory requirements. Application programs must be able to automatically adjust Window and control sizes to meet the needs of available window sizes, video display unit sizes
    and screen resolutions, switching between vertical and horizontal viewing, vertical and horizontal scrolling, changes in font sizes , and variations in the available screen space due to usage of vertical and horizontal toolbars.
     Software developers must be careful that resizing doesn’t squeeze controls too close together or make them so small that they cannot be finger or stylus selected when used with touch screens.
    Some of the required automatic resizing options are provided by the Microsoft software compilers and the Windows operating system.  Softgroup Component’s “.NET  Forms Resize” is an example of one of the third party applications that provide advanced
    resizing functionality.
    Many of the resizing functions are programmer options and, if not properly enabled, an application may not have the required resizing functionality. At the current state of the art, application programs are highly variable in their capability to do the “intelligent
    resizing” that is required to handle different display environments.
    A case in point is the Microsoft Preview Application for Windows 10. When entering lengthy comments, the send button becomes positioned off the end of the program window. It is possible to scroll to the button, but the display automatically resets when scroll
    is released. The result is that the text cannot be sent. You can try a "blind" TAB to the SEND button. This appeared to work after several tries, but the comment was apparently not received,
    RERThird

    Hi,
    What do you see when you open the same PDF file in Acrobat Reader? Are the words still squeezed than?
    Dimaxum

  • Automatic resizing of photos

    Hello,
    i have a problem with automatic resizing of photos on the ipad: When i have a picture that is smaller than the ipad resolution, the phjoto app stretches it automatically to fitz the screen.
    i haven't found out how to avoid that and leave it as original resolution.
    Can anybody help me?

    The only way I know is to get a 3rd party app for importing the photos and for displaying and viewing the photos.
    Search on photo import and photo viewing on the itunes apps pages and you'll see a lot of apps that do this. Most have additional capabilities that are very useful.

  • Automatically resize subscreens in ITS

    Hi all,
    We have a problem with the default size of subscreens in ITS.
    We have created an ITS service for transaction CAT2. The first screen of this transaction is skipped. The screen displayed shows 2 subscreens: Worklist and Data entry area. If the transaction is executed in the SAP Gui, the subscreens are automatically sized according to the screen resolution. In the Web Gui however, the subscreens are initially displayed in the smallest size. After pressing enter, the subscreens are resized according to the screen resolution.
    The following parameterset is used in the ITS service:
    ~WEBGUI                            1
    ~RECORD                            1
    ~SINGLETRANSACTION       1
    ~TRANSACTION       cat2
    ~WEBGUI_SIMPLE_TOOLBAR     40
    ~WEBGUI_THEME       99
    ~WEBGUI_ICON_TOOLBAR                                                                               
    ~NOSPLASH                            1
    ~WEBGUI_CONTEXTMENU  1
    ~USERTIMEOUT       0
    ~FLICKERFREE       1
    ~SYNCBEHAVIOUR        ignoreResync
    ~DESIGNS                             sap_streamline
    ~WEBTRANSACTIONTYPE   EWT
    ~DISCONNECTONCLOSE        0
    Is there anyway to ensure that the subscreens are automatically resized when the transaction is started in ITS?
    Thanks!
    Patrick

    Hi Patrick,
    What version of the ITS are you using?  This is a known limitation/issue of the ITS.  A few notes exist, like 1270522, but I am not sure which is relevant for your system, or if it can be resolved at all without the ITS version.
    Edgar

  • How to I stop safari from automatically resizing the bookmark bar when I click on the search bar?

    there is probably an eloquent way to ask this but I don't even know what the feature is called.
    Here is what it's doing:
    I'm using safari in landscape mode on my iPad.
    I click on the search bar and then the bookmarks come up below.
    It takes a second to automatically resize to a size that make no sense, usually cutting off bookmark titles...and the delay of it resizes drives me nuts.
    Safari did not used to do this until I guess ios 8. Any ideas how to stop this annoying "feature"??

    Try deleting the Cache.db...
    Quit Safari.
    Go to ~/Library/Caches/com.apple.Safari/Cache.db
    Move the Cache.db file from the com.apple.Safari folder to the Trash.
    Relaunch Safari ...
    You may want to try the Safari Reading List as an alternative to tabs.
    Click the eyeglass icon just to the left of the Bookmarks icon top left side of the Safari window.
    Drag the url to the window or click Add Page

  • How to have automatic resizing of container when JInternalFrame resizes?

    Is there a good way for the automatic resizing of its container when a JInternalFrame is resized?
    The intent is to have the JTree below, automatically resize. for example,
    if you type newlines into the JTextArea contained in JInternalFrames.
    (Tried adding the JInternalFrames to a JDesktopPane, but it did not display them. I wonder if it is inefficient to have a JDesktopPane for each tree node).
    Is there any way to know if a JInternalFrame is resizing? Perhaps then one can reload the tree as:
    treeModel.reload()thanks,
    Anil
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.util.EventObject;
    import javax.swing.BorderFactory;
    import javax.swing.Box;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextArea;
    import javax.swing.JToggleButton;
    import javax.swing.JTree;
    import javax.swing.UnsupportedLookAndFeelException;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeSelectionModel;
    public class TreeFrames extends JPanel {
           AnilTreeCellRenderer3 atcr;
           AnilTreeCellEditor4 atce;
           DefaultTreeModel treeModel;
           JTree tree;
         public TreeFrames() {
                super(new BorderLayout());
                   treeModel = new DefaultTreeModel(null);
                   tree = new JTree(treeModel);
                  tree.setEditable(true);
                   tree.getSelectionModel().setSelectionMode(
                             TreeSelectionModel.SINGLE_TREE_SELECTION);
                   tree.setShowsRootHandles(true);
                  tree.setCellRenderer(atcr = new AnilTreeCellRenderer3());
                  tree.setCellEditor(atce = new AnilTreeCellEditor4(tree, atcr));
                   JScrollPane scrollPane = new JScrollPane(tree);
                   add(scrollPane,BorderLayout.CENTER);
         public void setRootNode(DefaultMutableTreeNode node) {
              treeModel.setRoot(node);
              treeModel.reload();
           public static void main(String[] args) throws ClassNotFoundException,
           InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
                TreeFrames tb = new TreeFrames();
                tb.setPreferredSize(new Dimension(800,600));
                  JFrame frame = new JFrame("Tree Windows UI Failed");
                  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  frame.setContentPane(tb);
                  frame.setSize(800, 600);
                  frame.pack();
                  frame.setVisible(true);
                  tb.populate();
         private void populate() {
              TextAreaNode3 r = new TextAreaNode3(this);
              setRootNode(r);
              r.gNode.addFrame();
              r.gNode.addFrame();
              TextAreaNode3 a = new TextAreaNode3(this);
              a.gNode.addFrame();
              treeModel.insertNodeInto(a, r, r.getChildCount());
              treeModel.reload();
    class AnilTreeCellRenderer3 extends DefaultTreeCellRenderer{
         TreeFrames panel;
    DefaultMutableTreeNode currentNode;
      public AnilTreeCellRenderer3() {
         super();
    public Component getTreeCellRendererComponent
       (JTree tree, Object value, boolean selected, boolean expanded,
       boolean leaf, int row, boolean hasFocus){
         TextAreaNode3 currentNode = (TextAreaNode3)value;
         NodeGUI4 gNode = (NodeGUI4) currentNode.gNode;
        return gNode.hBox;
    class AnilTreeCellEditor4 extends DefaultTreeCellEditor{
      DefaultTreeCellRenderer rend;
      public AnilTreeCellEditor4(JTree tree, DefaultTreeCellRenderer r){
        super(tree, r);
        rend = r;
      public Component getTreeCellEditorComponent(JTree tree, Object value,
       boolean isSelected, boolean expanded, boolean leaf, int row){
        return rend.getTreeCellRendererComponent(tree, value, isSelected, expanded,
         leaf, row, true);
      public boolean isCellEditable(EventObject event){
        return true;
    * this is done to keep gui separate from model - as in MVC.
    * not necessary.
    * @author juwo
    class NodeGUI4 {
         JPanel notes = new JPanel();
         final TreeFrames view;
         Box hBox = Box.createHorizontalBox();
         final JTextArea textArea = new JTextArea( 1, 5 );
         NodeGUI4( TreeFrames view_ ) {
              this.view = view_;
              hBox.add( textArea );
              textArea.setBorder( BorderFactory.createMatteBorder( 0, 0, 1, 0, Color.GREEN )
              hBox.add(notes);
              hBox.setBorder( BorderFactory.createMatteBorder( 5, 5, 5, 5, Color.CYAN ) );
         void addFrame() {
            MyInternalFrame frame = new MyInternalFrame();
            frame.add(new JTextArea(1,5));
            frame.setVisible(true); //necessary as of 1.3
            notes.add(frame);
            try {
                frame.setSelected(true);
            } catch (java.beans.PropertyVetoException e) {}
    class TextAreaNode3 extends DefaultMutableTreeNode {
         NodeGUI4 gNode;
         TextAreaNode3(TreeFrames view_t) {
              gNode = new NodeGUI4(view_t);
    class MyInternalFrame extends JInternalFrame {
        static int openFrameCount = 0;
        static final int xOffset = 0, yOffset = 0;
        public MyInternalFrame() {
            super("Document #" + (++openFrameCount),
                  true, //resizable
                  true, //closable
                  true, //maximizable
                  true);//iconifiable
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            setSize(300,300);
            //Set the window's location.
            setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
            this.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE);
    }

    I think this does what you want; it's basically the same technique as we used before.
    It also suffers from an interesting bug: if I type in the text area inside the internal frame, the editor resizes nicely
    with the node below it staying visible; if I type in the text area next to the panel, the editor will resize over the node
    below it. I didn't dig into it further to see the cause.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Insets;
    import java.awt.Rectangle;
    import java.awt.event.ComponentAdapter;
    import java.awt.event.ComponentEvent;
    import java.util.EventObject;
    import javax.swing.BorderFactory;
    import javax.swing.Box;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTree;
    import javax.swing.UnsupportedLookAndFeelException;
    import javax.swing.event.DocumentEvent;
    import javax.swing.event.DocumentListener;
    import javax.swing.plaf.basic.BasicTreeUI;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    public class TreeFrames extends JPanel {
         AnilTreeCellRenderer3 atcr;
         AnilTreeCellEditor4 atce;
         DefaultTreeModel treeModel;
         JTree tree;
         public TreeFrames() {
              super( new BorderLayout() );
              treeModel = new DefaultTreeModel( null );
              tree = new JTree( treeModel );
              tree.setUI( new TextAreaTreeUI() );
              tree.setEditable( true );
              tree.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION );
              tree.setShowsRootHandles( true );
              tree.setCellRenderer( atcr = new AnilTreeCellRenderer3() );
              tree.setCellEditor( atce = new AnilTreeCellEditor4( tree, atcr ) );
              JScrollPane scrollPane = new JScrollPane( tree );
              add( scrollPane, BorderLayout.CENTER );
         public void setRootNode( DefaultMutableTreeNode node ) {
              treeModel.setRoot( node );
              treeModel.reload();
         public static void main( String[] args ) throws ClassNotFoundException, InstantiationException,
                   IllegalAccessException, UnsupportedLookAndFeelException {
              TreeFrames tb = new TreeFrames();
              tb.setPreferredSize( new Dimension( 800, 600 ) );
              JFrame frame = new JFrame( "Tree Windows UI Failed" );
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.setContentPane( tb );
              frame.setSize( 800, 600 );
              frame.pack();
              frame.setVisible( true );
              tb.populate();
         private void populate() {
              TextAreaNode3 r = new TextAreaNode3( this );
              setRootNode( r );
              r.gNode.addFrame();
              r.gNode.addFrame();
              TextAreaNode3 a = new TextAreaNode3( this );
              a.gNode.addFrame();
              treeModel.insertNodeInto( a, r, r.getChildCount() );
              treeModel.reload();
         private static class AnilTreeCellRenderer3 extends DefaultTreeCellRenderer {
              TreeFrames panel;
              DefaultMutableTreeNode currentNode;
              public AnilTreeCellRenderer3() {
                   super();
              public Component getTreeCellRendererComponent( JTree tree, Object value, boolean selected, boolean expanded,
                        boolean leaf, int row, boolean hasFocus ) {
                   TextAreaNode3 currentNode = (TextAreaNode3) value;
                   NodeGUI4 gNode = (NodeGUI4) currentNode.gNode;
                   return gNode.hBox;
         private static class AnilTreeCellEditor4 extends DefaultTreeCellEditor {
              DefaultTreeCellRenderer rend;
              public AnilTreeCellEditor4( JTree tree, DefaultTreeCellRenderer r ) {
                   super( tree, r );
                   rend = r;
              public Component getTreeCellEditorComponent( JTree tree, Object value, boolean isSelected, boolean expanded,
                        boolean leaf, int row ) {
                   return rend.getTreeCellRendererComponent( tree, value, isSelected, expanded, leaf, row, true );
              public boolean isCellEditable( EventObject event ) {
                   return true;
          * this is done to keep gui separate from model - as in MVC. not necessary.
          * @author juwo
         private static class NodeGUI4 {
              JPanel notes = new JPanel();
              final TreeFrames view;
              Box hBox = Box.createHorizontalBox();
              final JTextArea textArea = new JTextArea( 1, 5 );
              NodeGUI4( TreeFrames view_ ) {
                   this.view = view_;
                   hBox.add( textArea );
                   textArea.setBorder( BorderFactory.createMatteBorder( 0, 0, 1, 0, Color.GREEN ) );
                   hBox.add( notes );
                   hBox.setBorder( BorderFactory.createMatteBorder( 5, 5, 5, 5, Color.CYAN ) );
                   DocumentListener dl = new DocumentListener() {
                        public void insertUpdate( DocumentEvent de ) {
                             resizeEditor();
                        public void removeUpdate( DocumentEvent de ) {
                             resizeEditor();
                        public void changedUpdate( DocumentEvent de ) {
                   textArea.getDocument().addDocumentListener( dl );
              void addFrame() {
                   MyInternalFrame frame = new MyInternalFrame();
                   frame.getContentPane().add( new JTextArea( 1, 5 ) );
                   frame.setVisible( true ); // necessary as of 1.3
                   notes.add( frame );
                   try {
                        frame.setSelected( true );
                   } catch ( java.beans.PropertyVetoException e ) {
                   frame.addComponentListener( new ComponentAdapter() {
                        public void componentResized( ComponentEvent e ) {
                             resizeEditor();
              private void resizeEditor() {
                   TreePath path = view.tree.getEditingPath();
                   if ( path != null ) {
                        Rectangle nodeBounds = ( (BasicTreeUI) view.tree.getUI() ).getPathBounds( view.tree, path );
                        Dimension editorSize = getEditorPreferredSize();
                        hBox.setBounds( nodeBounds.x, nodeBounds.y,
                                  editorSize.width, editorSize.height );
                        hBox.validate();
                        Rectangle visRect = view.tree.getVisibleRect();
                        view.tree.paintImmediately( nodeBounds.x, nodeBounds.y,
                                  visRect.width + visRect.x - nodeBounds.x,
                                  editorSize.height );
                        ( (TextAreaTreeUI) view.tree.getUI() ).resizeTree( path );
              private Dimension getEditorPreferredSize() {
                   Insets insets = hBox.getInsets();
                   Dimension boxSize = hBox.getPreferredSize();
                   Dimension taSize = textArea.getPreferredSize();
                   Dimension nSize = notes.getPreferredSize();
                   int height = taSize.height + nSize.height + insets.top
                             + insets.bottom;
                   int width = taSize.width + nSize.width;
                   if ( width < boxSize.width )
                        width += insets.right + insets.left + 3; // 3 for cursor
                   return new Dimension( width, height );
         private static class TextAreaNode3 extends DefaultMutableTreeNode {
              NodeGUI4 gNode;
              TextAreaNode3( TreeFrames view_t ) {
                   gNode = new NodeGUI4( view_t );
         private static class MyInternalFrame extends JInternalFrame {
              static int openFrameCount = 0;
              static final int xOffset = 0, yOffset = 0;
              public MyInternalFrame() {
                   super( "Document #" + ( ++openFrameCount ), true, // resizable
                             true, // closable
                             true, // maximizable
                             true );// iconifiable
                   // ...Create the GUI and put it in the window...
                   // ...Then set the window size or call pack...
                   setSize( 300, 300 );
                   // Set the window's location.
                   setLocation( xOffset * openFrameCount, yOffset * openFrameCount );
                   this.putClientProperty( "JInternalFrame.isPalette", Boolean.TRUE );
         private class TextAreaTreeUI extends BasicTreeUI {
              public void resizeTree( TreePath path ) {
                  treeState.invalidatePathBounds(path);
                  updateSize();
    }

  • Can an InDesign swf document automatically resize?

    Hello,
    Using InDesign CS4, I've created an interactive document and exported into a swf format.
    The document size is 1024 x 768 px, but will not resize without cropping parts of the document. This means that the majority of users won't be able to use the document unless they have the same desktop size or larger than 1024 x 768.
    I've tried changing the export options in InDesign to get the document to resize, and I've also tried exporting and changing settings in Flash which works but removes all of the interactivity.
    From what I've read I don't think it is possible to do this from the Adobe suite.
    Does anyone know if there any way this document can be displayed in a browser and automatically resize according to the users desktop resolution? This could be either via some functionality I haven't tried within the Adobe software or by using some software or code to imbed with the document on the webpage.
    I can upload the document if needed.
    Thanks for your help.

    You can set the embedded swf to scale with the browser window (not fullscreen mode) via the HTML holder generated by ID. Set width and height to "100%" and scale to "showall"
    Keep in mind that the browser window could be any size, so text might be be illegible in a small browser window or awkwardly oversized in a large window.

  • [SOLVED] GNOME 3.8 annoying window resize problem

    Hello all fellow early-adopters :-)
    A very annoying quirk I've noticed, moving from GNOME 3.6 to 3.8, is that it no longer remembers, nor retains, the size/positions I set for many of my application windows. For example, my mail client (Evolution) is sized to fill most of my screen (centrally), with Empathy and Skype as long narrow windows on both sides - giving me a nice, broad "communications" overview on that particular desktop (with dev tools etc open on others).
    On 3.6, this layout was retained during my session, as well as next time I started these apps up.
    In GNOME 3.8, not only does it insist that these windows are always started as small little bunched-up windows that I need to resize, but every time a window displays a notification/warning (message in internal yellow bar inside the window - such as loss of internet connection, mail retrieval failure etc) it resizes the windows spontaneously to a stupid, small size that overlays the other windows. This is driving me crazy!
    Where can I learn a bit more about how window sizing / positioning works in GNOME 3.8, or is it finally time to switch to awesome wm? I want to love GNOME 3.8, I really do. It's so slick, but so... unpolished.
    I want to dig in an assist with problems like these, but I need some pointers to some background material first to understand the problem. Is it the window manager? Is it the app?
    ** UPDATE: Doing a full system upgrade, as of May 18, 2013, has resolved this annoying problem. My windows now stay where they belong, and start with the same size they were closed with. GNOME is now pleasant to use again :-)
    Last edited by dawid.loubser (2013-05-21 13:37:25)

    dawid.loubser wrote:Thanks for the suggestion drtebi - I'll give it a try.
    I really like GNOME 3.x though (and would like to understand the windowing behaviour), but if the annoying quirks are insurmountable, I will happily switch.
    Man I love GNOME 3.x. I admire the courage they had to change, basically, everything, and I find myself more productive with my GNOME 3 Arch box than with my good ol' Slackware KDE 4 box. I just hate those bugs - for example I filed a task in their bugtracker for this window resize problem I have with gedit. If it's a love/hate relationship, I think it's marriage ^_^
    With the 3.8 upgrade, deadbeef was having a similar problem with window size/position. I just recompiled it against the latest GTK+3 package upgrade (that came after the 'big upgrade' here on Arch) and it was fixed. But not with gedit
    bwat47 wrote:
    Man I really hope this gets fixed soon, because aside from this one incredibly annoying issue I am loving gnome 3.8.
    I get the feeling gnome badly needs more beta testers, sizable regressions like this in "stable" releases happen way too often sad.
    I get the exact same feeling. Well bugs exist everywhere, there's no denying. But I think it would be wiser to 'alternate' the nature of each major stable release - one focusing on new features and one focusing on fixing bugs. For example if the only new features in GNOME 3.10 were the AppsFolder full implementation and the introduction of gnome-calendar, and the rest of the development cicle being devoted to fix bugs, I'd be more than happy.
    Like Fedora and Ubuntu, the fixed 6-month release cycle colaborates with the bugs. They don't do like Debian or Slackware which are released 'when they are ready'.
    EDIT: fout (yet) another bug. At least with facebook chat (haven't tested with other telepathy plugins) the buddy tray icon appear duplicate. Anybody with the same issue?
    Last edited by lmello (2013-05-02 14:06:06)

  • How can I set the minimum size the location bar should automatically resize to

    I have moved all of my navigation buttons, location bar and tabs to be in line. This has been done to maximise the available space on screen.
    This works perfectly with two or three tabs open, but once more tabs are opened the location bar automatically shrinks to allow for more tabs and becomes unusable. I want to set the minimum size the location bar should shrink to but I do not know how to do this.
    [http://www.mediafire.com/imgbnc.php/eed5749531b3081c43186f59492500e5f089c498c0372fb6fa797b7d697826806g.jpg Screen shot displaying automatically resizing location bar]
    Any help would be appreciated.
    Thanks.

    FBZP seems to be the only way to do the minimum amout setting in standard SAP.
    You can check the BTE (Business transaction event) 00001820 for excluding the low amount items in F110. Please search SDn on how to use the BTEs.
    Regards,
    SDNer

  • How do iViews on SDN automatically resize themselves?

    Hello,
    I am looking for a solution by which I can resize the current iView. I am working on EP6.0 SP2 Patch 4.
    I believe SDN embeds a JavaScript in every iView to enable auto-resizing, so that when the content becomes large enough, the iView automatically resizes itself. I want to use this feature to eliminate vertical scrollbars and would definitely like some inputs ASAP.
    Thanks in advance,
    Sagar Kirtany

    Yes I am using CS6. Every design made is in PNG format with a transparent background yes. All products rougly go in the same position also. If I can map out a specific area where the design should go with a center point that would be great. Alot of my designs are different shapes and sizes but if I can map out an area with a centre point so the design gets resized and placed there whilst keeping it's aspect ratio it should be fine.

  • Automatic resizing of Window

    I've created a window that let's the user know that a child transaction
    is being started. I add three dots to a TextGraphic widget message
    until the child task is started. However, the window pane automatically
    gets bigger every time the three dots are added (using a TickInterval
    parameter). I tried coding the widget as a size of explicit, but then
    the dots aren't added. I also tried setting the autosize enabled option
    on the Window property to off, but this hasn't seemed to help. I've
    sized the window with more than enough room for the extra dots, but the
    window still gets resized each time. I am using the UpdateFromData
    method to update the window.
    I want the dots to be added with the window pane resizing itself
    everytime.
    Any help would be appreciated.
    Thanks,
    Dave
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I want the dots to be added with the window pane resizing itselfeverytime. <<
    Don't you mean **without resizing** ?
    I tried coding the widget as a size of explicit <<This should work, but you will have to manually re-size the TextGraphic
    on the window to a sufficient width.
    An alternative would be to group this widget into a panel and then
    re-size the panel to a sufficient width and set the panel size policy to
    explicit (default).
    Hope this helps.
    Prashant.
    From: Ehrlich, Dave[SMTP:[email protected]]
    Reply To: Ehrlich, Dave
    Sent: Monday, August 10, 1998 3:02 PM
    To: Forte Users Group (E-mail)
    Subject: Automatic resizing of Window
    I've created a window that let's the user know that a child
    transaction
    is being started. I add three dots to a TextGraphic widget message
    until the child task is started. However, the window pane
    automatically
    gets bigger every time the three dots are added (using a TickInterval
    parameter). I tried coding the widget as a size of explicit, but then
    the dots aren't added. I also tried setting the autosize enabled
    option
    on the Window property to off, but this hasn't seemed to help. I've
    sized the window with more than enough room for the extra dots, but
    the
    window still gets resized each time. I am using the UpdateFromData
    method to update the window.
    I want the dots to be added with the window pane resizing itself
    everytime.
    Any help would be appreciated.
    Thanks,
    Dave
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • PSE how to have photo automatically resize the a 12 X 12 background document

    I was told that when you drag a photo onto a 12x12 document it will automatically resize to the 12 x 12. When I do it in PSE the photo is small...and asking me to transform it. Is this different within these two programs or is there a work around in PSE. I had a friend try it in her photoshop program and the image wasn't distorted at all...Didn't appear huge, like if I transform it.

    Both are set at 300....it's a very small picture... 4x3 my online friend uses CS5 and said it automatically changed it to the 12x12 blank document when she dragged it on...I did that but it gets very large and blurry...I studied about smart objects and used place to open photo and then tried to resize it....she clipped a mask watercolor underneath to give it emphasis... she then tilted the whole picture.she's out of town for the moment...I was trying to figure out what she did...for the life of me I can't get mine to resize to the 12 x 12....it expands larger than hers when I try.
    Date: Sun, 25 Mar 2012 11:18:13 -0600
    From: [email protected]
    To: [email protected]
    Subject: PSE how to have photo automatically resize the a 12 X 12 background document
        Re: PSE how to have photo automatically resize the a 12 X 12 background document
        created by photodrawken in Photoshop Elements - View the full discussion
    When an image is added to a document, the incoming image is scaled to the resolution of the target document.  Make sure the resolution is the same for both, or simply use the Move tool on the pasted image to resize it to suit.  The incoming photo is never resized automatically to the target document's dimension. Ken
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4290232#4290232
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4290232#4290232. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for