Problems resizing JSplitPane

I have a JSplitPane with a Canvas3D on one side. It won't allow the split pane to be resized to make the canvas smaller. It will allow the splitpane to be resized to make the canvas larger, though.
Is there a way to fix this?
Thanks,
Brian.

The solution for this problem is a little bit tricky:
- put a JScollPane (not a ScrollPane!) to one side of the JSplitPane and set the scrollbar policies to ..._SCROLLBAR_NEVER
- put your Canvas3D into the ViewPort of the JScrollPane
- create a PropertyChangeListener which listens to the JScrollPane and the JSplitPane
Now you can use the JSplitPanes but it looks ugly because the size of the Canvas3D doesn't changes. So every time a PropertyChange event occures you have to calculate the size of the Canvas3D using your JFrame's size and the JSplitPanes diver location and change the Canvas3D's size using setSize().
Oxygenic

Similar Messages

  • Problem with JSplitPane

    Hi!
    I have the following problem with JSplitPane: Whenever I add two components to the splitpane and then add the splitpane to a JPanel, the left component is minimized, i.e. not visible. I always have to manually readjust the splitter in order to see the left component. I also tried a bunch of combinations of setSize, etc. but nothing seems to help.
    Here's some code:
    public void setTables(Vector<DBTable> vec)
              _panel.setSize(650, 500);
              DefaultListModel m = new DefaultListModel();
              _tableList = new JList(m);
              // _tableList.setSize(new Dimension(300, 400));
              _infoArea = new JTextArea();
              _infoArea.setEditable(false);
              // _infoArea.setSize(new Dimension(250, 300));
              MetaDataListener listener = new MetaDataListener(_infoArea, _tableList);
              _tableList.addListSelectionListener(listener);
              for (DBTable table : vec)
                   m.addElement(table);
              JScrollPane scroll1 = new JScrollPane(_tableList);
              JScrollPane scroll2 = new JScrollPane(_infoArea);
              JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, scroll1, scroll2);
              split.setSize(new Dimension(600, 480));
              _panel.add(split, BorderLayout.CENTER);
              scroll1.setPreferredSize(new Dimension(300, 400));
              scroll1.setSize(new Dimension(300, 400));
              scroll2.setPreferredSize(new Dimension(300, 400));
              scroll2.setSize(new Dimension(300, 400));
              _panel.setVisible(true);
                                         //_frame referes to a JInternalFrame and _panel surprisingly to a JPanel
              _frame.getContentPane().add(_panel, BorderLayout.CENTER);
              _frame.setVisible(true);
              split.setDividerLocation(50.0);
         }Thanks!

    Nevermind I fixed it!

  • Problem resizing Viewport with WebDeveloper in WinXP and Vista

    I'm having a problem resizing the Viewport with WebDeveloper running in FF10 & FF11 on my WinXP and Vista machines. Quite simply, I'm trying to resize the Viewport to 320x420pixels (to represent an iPhone) but can't get it to go below 510px.
    There's no problem in FF1 on Win7. I have contacted Chris Pederick, the developer of WebDeveloper, and he says his code is tha same in all cases, and pretty basic JS. So possibly the fault lies in the browser. I've not noticed this problem in earlier versions of FF (i.e around 3.5)

    Try to hide all toolbars or open a second window and hide them there to see if that allows to make the window smaller.

  • Problem resizing objects

    I really think I may have lost it on this one. I am having
    problems resizing any object inside of illustrator. Normally when i
    use my selection tool, There is a box around the whole object that
    I can click and drag to resize. It's not there, and consequently, I
    can resize anything without going to
    Object&gt;Transform&gt; Scale... and that's just too much.
    Is there a setting I somehow messed with that did this? I am
    completely lost. I dont even have a clue what is goin on anymore.
    Any help would be much appreciated!

    You may have hit CTRL+SHIFT+B which hides the bounding box
    around objects. so hit CTRL+SHIFT+B again to see if that fixes the
    issue. You can also find it view/ under &quot;Show
    Rulers&quot;
    Sorry Dreamweaverites for replying to an Illustrator question
    in a Dreamweaver forum.
    I had to help a brother out. You Know,
    Shane

  • Problem Resizing Regions

    I'm having a problem resizing regions.
    On some regions, I can make the region shorter, but I cannot lengthen it.
    On other regions, I can make the region longer, but there is not silence in the added length - instead, the first notes of the region repeat (this happens using the little ruler symbol, not the the little circular arrow symbol)
    Does it make any difference if the region is a copied region? Can you only lengthen original regions and not copied regions? I tried changing the resolution as per a prior post about this problem and that did not help.
    Thanks for your suggestions.

    On some regions, I can make the region shorter, but I cannot lengthen it.
    you can not make an audio ("real") region longer then it's total length.
    On other regions, I can make the region longer, {but} the first notes of the region repeat (this happens using the little ruler symbol
    by "ruler" do you mean the Right bracket? something like <]>
    what type of region?

  • Big problem with JSplitPane

    Hello,
    I feel I'm going mad with Swing.
    I have a main main JTabbedPane: main.
    First component: JEditorPane : source
    Second Component: JPanel : view( = new JPanel())
    In view I have:
    JPanel toolbox to NORTH and JSplitPane: ds to CENTER.
    In ds I have:
    Left component: new JScrollPane(design) where design=new JPanel()
    Right component: JSplitPane(....) : called pe
    First problem:
    In ds the left component is too small. I tried to use all functions available , no result. I want the right component(pe) to have width=200, but no chance. It is too big. Why?
    Second problem:
    The scrolls are not appearing on the left at the ds(JSplitPane)
    Third problem:
    I add different components to design JPanel(the one which is placed into a JScrollPane which is related to the second problem) but nothing happens. They won't appear on design which is the same and without no scrolls.
    Please help me solve this Swing mistery.
    Thank you all.

    The split pane, by default, will size its two halves based on their preferred sizes. If the combined preferred sizes are too small (for the size of the spilt pane) then the extra space is distributed based on JSplitPane's resize weight. The default is to add the extra to the right hand side, see JSplitPane.setResizeWeight for an explanation. If you really want the right hand side to be exactly 200 pixels then you can programmatically move the divider to a location that would leave the right hand side to be 200. Or you can set the preferred size of the component you place there to 200 and set a resize weight that will give the extra space to the left instead of the right.
    I am not sure about why the scroll bars are not showing up. Does it need scroll bars?
    May I suggest creating a simple demo app to show the problem? Often I solve my own problems doing this otherwise you have some code for us to look at and play with.
    Ian

  • Problem resizing UI text in Photoshop CC

    I cannot resize UI fonts in Photoshop CC (icons, menu headings etc) - or rather I succeeded in resizing them once, moving from tiny to medium, and since then cannot change. I am using a 27 inch iMac running Windows 8.1. Altering settings in Windows does not solve the problem. Nor does forcing Photoshop to rebuild the preferences file under the roaming directory
    Menu subheads appear smaller than the main navigation
    Has anyone else experienced this bug? There seem to be many issues surrounding Photoshop CC UI display
    UPDATE
    A second resizing has now occurred, back to tiny. Subheads in menus remain unchanged - now significantly bigger than the Menu heads

    Thank you for replying
    I did restart, yes, many many times. And the change to a much larger font (and back again) happened without warning in the midst of these restarts. Almost certainly there is a  bug of some kind because the software behavior was not predictable.
    I tried the experimental setting after reading your message and found that it moved me back and forth between the medium and tiny fonts already seen (at least I assume that is what they were - one is too big the other too small). It is not a sophisticated tool. I need something between the two. Is there a way of setting it in some intermediate scale (call it 'small'), or is there no solution within Photoshop?
    I did not have this problem on my old iMac. The only change between the two machines is that the new one is retina display.

  • I'm having problems (1)selecting onscreen text, (2) having problems resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    I'm having problems (1) selecting onscreen text, (2) resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

  • Problem with JSplitPane.setDividerPosition

    An applet has a split panel, a list of items shown to the left and a map display to the right.
    The problem I'm getting is that the divider bar insists on starting life in the middle.
    My intialisation looks like this:
        protected void initGui() {
            Container content = getContentPane();
            JMenuBar bar = new JMenuBar();
            setupMenu(bar, MK_MENU_DATASTORE, dataStoreMenu);
            setJMenuBar(bar);
            content.setBackground(new Color(0xfffeff));
            layerList = new JPanel();
            layerList.setLayout(new BoxLayout(layerList, BoxLayout.Y_AXIS));
            layerList.add(Box.createVerticalGlue());
            mapPanel = new ViewPanel();
            JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, layerList, mapPanel);
            split.setDividerLocation(ViewLayer.LAYERBOX_WIDTH);
            split.validate();
            content.add(split);
            validate();
        }Now the divider location I set seems to get squirreled away somewhere, because when I click the bar with the mouse it jumps to the correct position but it refused to initialise to the right position.

    Oops! Spotted it.

  • So simple, yet so annoying: problem resizing anchored frame with grab bars

    Asked a question yesterday on how to 'snug' an anchored frame to an image. Got the answer and it works great (Esc-m-p)
    Now... the reason I needed to do this is that when I try to resize a frame with the grab bars, it 'jerks' as I move vertically or horizontally.
    What that means is...
    With borders on, the frame border is a dotted line.
    If I grab the left side of a frame and move my mouse to the right to make the frame smaller, the border doesn't move smoothly -- it jumps a distance of about 1.5 of those dotted lines. Thus I can't always make the frame fit nicely.
    Talked to another Frame user and she said that her's drags smoothly.
    So... am I missing a setting somewhere? Any thoughts would be greatly appreciated.

    ##&*!
    I was working over a VPN when I first experienced the problem... everything was slower than molasses. Set Snap off, did some other work, Frame crashed.
    Setting didn't persist, but everything had taken so long I forgot to check it.
    Gah. Yes, Snap off works wonders when it's *actually* off.

  • Problem resizing the JDialog???

    hi,
    I have a JDialog to which I am adding a JTable and JButton to search.
    Based on search condition the table gets populated.
    Problem here is
    I give search condition 1 and puplate the table after that I resize the JDialog
    Now i again serach it.Now the JDialog's size goes to the previous thing it does'nt take the resized size.
    in the end of my seacrh action listner I am doing
    this.pack();
    this.setVisible(true);
    this.setResizable(true);While running in debug mode I noticed once it execute this.pack();
    the resizing is gone.but if I remove this.pack() the JTable is not shown...
    Any idea about this problem??
    thnx
    neel

    The pack() method lays it out according to the preferred size of the content.
    You need to either only pack it when you first create it, or note the actual size before packing and if it's non-null and non-zero then restore it after packing.

  • Problem resizing application in SWFLoader content in DividedBox

    Hi all,
    I have some strange behavior in my application. I am extending the plugin system as described by Chris Cantrell, the problem I have might be of more general nature though.
    http://blogs.adobe.com/cantrell/archives/2010/03/extending_air_applications_with_plugins.h tml
    I am loading a plugin (which is a WindowedApplication compiled to an .swf file and loaded via a SWFLoader) into a NavigatorContent within a ViewStack within a DividedBox. I am using pure AS3 files for logic and mxml skins for the GUI layout.
    When I resize the main application window, the SWFLoader.content.application is resized twice (Resize Events seem to come from WindowedApplication window_resizeHandler (first) and setStageWidth (second)) in the main application window. The first event seems to return the correct size, the second seems to ignore the size of the other content Containers in the DividedBox and returns a stage width equal to the width of the DividedBox part that contains the SWFLoader, which also resizes the whole window to that size again.
    When I only move the BoxDivider of the DividedBox nothing actually happens to the size of the SWFLoader.content.application.
    I tried using some manual Bindings via BindingUtils to set NavigatorContent.width, SWFLoader.content.width and SWFLoader.content.application.width but no success. Any Ideas how I could force the components to the right size, first when resizing the main application window, second when moving the BoxDivider?
    Thank you,
    rob

    postet my workaround here
    http://lifesdev.blogspot.com/2011/02/resizing-dynamically-loaded-swfs-using.html

  • Problems resizing SWF to browser

    Hi all,
    I am having trouble making a SWF project resize to full screen.  I am using a third party flash component “Slideshowpro” and I am working with CS5 Flash and CS5 Dreamweaver.
    There is only 1 layer when I open slideshowpro and I have added the following code to the first key by opening “Window>Actions” in Flash:
    import net.slideshowpro.slideshowpro.*;
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    resizeHandler(null);
    function resizeHandler(event:Event) {
         my_ssp.setSize(stage.stageWidth,stage.stageHeight);
    stage.addEventListener(Event.RESIZE, resizeHandler);
    I set my instance name to "my_ssp"
    I also did a similar set up in Flash “Publish Settings” on the HTML tab (W/H 100%, Scale: No scale, Flash Alignment Hor/Left and Vert/Top).
    I also set height and width to 100% in html doc using Dreamweaver.  The site is www.rannallenphotography.com.
    I can only see a truncated version of my SWF movie in IE and only gray background in Firefox?  If I add any px dimension to the horizontal position, the SWF slideshow opens to max width and the horizontal pixel dimension…
    I feel as if I am overlooking something simple being a novice at Flash and DW.
    Any Suggestions?
    Randy

    Not sure how, but by coping code from a website where resizing worked, my website now works and the swf resizes to browser...   Now when I exit from Full Screen it resizes incorrectly, but that (I think) is a flash problem. 
    thanks

  • Problems Resizing Project (Captivate 5)

    I am running into a strange problem and I was wondering if someone knew why the following was happening.
    1) I capture my movie at 1280x720
    2) I save it and rescale the project to 889x500 maintaining aspect ratio (which for some reasons ends up being 883x497 after saving)
    3) I add the TOC in overlay mode.  The open/close TOC arrows appear over the browser "x" close button which was not clear so I resized the project so the open/close TOC arrows appear above the main movie (rescale project, uncheck "maintain aspect ratio", added 18 pixels to height, select "keep project the same size...", and positioned Bottom Center).
    4) In edit mode, my mouse and keystrokes look fine
    5) But when I preview or publish, my mouse moves what looks to be 18 pixels below where it should be.  Plus the background acts strange.  You will see in the screenshots below, in the upper left my mouse is clicking in the right place but the buttons are appearing 18 pixels higher (I think where they were originally located).  You will also see the typing appear below where it should be in the box (and what I see in edit mode).
    Any ideas why this is happening?  Everything works fine prior to adding the 18 pixels to the top.
    Thanks!

    In Captivate content when you capture typing text on the screen it ends up as a special type of object that sits on it's own hidden layer and is set to be positioned from the top left corner of the screen.  When you change this positioning reference by resizing your content, it doesn't affect the text typing layer in the same way as other content.  So you end up with this issue.
    If you really MUST do all this resizing (which can also get you into trouble with other Cp issues such as ghost lines) the workaround for the typing text issue is to right click on the typing in Edit mode, convert it to animated text, and then position that as needed.

  • [iPhone] Autorotation and Problem Resizing UIWebView

    I'm loading a UIViewController with a UIWebView embedded in it. However, the UIWebView doesn't always resize correctly. Here are the steps I follow:
    a) I view the UIWebView in portrait mode...
    b) I autorotate to landscape mode...
    c) I load a new HTML string using [webView loadHTMLString:self.htmlText baseURL:nsurl];
    webView is an instance of UIWebView.
    nsurl points to a local HTML file.
    d) I rotate back to portrait mode... this is where the text extends beyond the right border of the screen. It appears that the UIWebView keeps the horizontal landscape dimensions after I rotate back to portrait mode.
    The strange thing is that this only happens after I call [webView loadHTMLString:self.htmlText baseURL:nsurl];
    I'm running the latest OS and the programming using the newest SDK.
    Any thoughts?

    The solution to my other UIWebView/Autorotation problem also solved this. I added the viewport meta tag to each HTML page. I dynamically changed this tag using some javascript every time the device rotated and explicitly set the width to 320 and height to 480, or vice versa. If you use this solution, make sure you include spaces before and after the "=" in the meta tag. See the examples on the following page: http://developer.apple.com/documentation/AppleApplications/Reference/SafariHTMLR ef/Articles/HTMLExtensions.html#//appleref/doc/uid/TP40002066-DontLinkElementID13

Maybe you are looking for

  • A/R balance and outstanding checks per customer

    Hi Experts, Is there a way to query to get the information as to the A/R balance and the Outstanding checks of a customer? Columns would be document number, document date, Customer Name, A/R balance, Outstanding checks and Total. Parameters will be d

  • Goods Receipt Label

    Hi, I am using the following for printing the label. I am using output type wee1 Program SAPM07DR FORM routine ENTRY_ETIE Form RM07ETIKETT I am generating the output using MBO2. The output is being generated but i am not getting the print out. Please

  • Newbie: Mail Transfer Problems from Mac 10.6.2 to Mac 10.8.2

    I am giving my old macbookpro away (OS 10.6.2) and got a new OS 10.8.2 How do I transfer my Mail (everything from inbox to sent items) from the old mac os to the new MacbookPro laptop's Mail? I am a newbie but uses the Mac's Mail for my business and

  • Report In SAP using Analysis Services

    Hi there Could some please point me in the right direction. I would like to build a few report using SAP B1. Age Analysis [Which Tables do i use for this view] Statement [Which Tables do i use for this view] I do not want to use SAP reports as the re

  • How to open PPro CC project in PPro CS6?

    I have upgraded to CC on my home machine, but filmmakers that I work with have decided to continue using CS6. I have put together a rough cut of a recently shot film in my PPro CC program - how do my colleagues open this project in their PPro CS6 pro