JPopupMenu/JMenuItem sizing problem

Hi All,
I have a JPopupMenu that is displayed when a right-click takes place. The popup menu should display three JMenuItems when a vertex is right-clicked and one menu item when an edge is right-clicked. However, when I right-click a vertex, only two menu items are visible, and when I right-click an edge, zero menu items are visible (the popup menu appears, but it is so small that I can't see the menu item).
Here is the relevant code:
          protected void handlePopup(MouseEvent me) {
            final VisualizationViewer vv = (VisualizationViewer)me.getSource();
            Point2D p = vv.inverseViewTransform(me.getPoint());
            PickSupport pickSupport = vv.getPickSupport();
            if(pickSupport != null) {
                Vertex v = pickSupport.getVertex(p.getX(), p.getY());
                Edge e = pickSupport.getEdge(p.getX(), p.getY());
                if((v != null) && (v instanceof BrokerVertex)) {                 
                     JPopupMenu popup = new JPopupMenu();
                    JMenuItem m_SetAdvMenuItem = new JMenuItem(MonitorResources.M_SET_ADV);
                    m_SetAdvMenuItem.addActionListener(m_MonitorFrame);
                    popup.add(m_SetAdvMenuItem);
                    JMenuItem m_centerVertex = new JMenuItem("Center Vertex");
                    m_centerVertex.setAction(new CenterAction(m_graph.getLayout().getLocation(v)));
                    popup.add(m_centerVertex);
                    JMenuItem m_SetSubMenuItem = new JMenuItem(MonitorResources.M_SET_SUB);
                    m_SetSubMenuItem.addActionListener(m_MonitorFrame);
                    popup.add(m_SetSubMenuItem);
                    popup.show(vv, me.getX(), me.getY());
                    popup.pack();
                } else if ((e != null) && (e instanceof MonitorEdge)) {
                     MonitorEdge mEdge = (MonitorEdge) e;
                     JPopupMenu popup = new JPopupMenu();
                     boolean activationCountDisplayStatus = mEdge.activationCountIsDisplayed();
                     String activationCountToggleMessage;
                     if (activationCountDisplayStatus) {
                          activationCountToggleMessage = "Hide Message Counter";
                     } else {
                          activationCountToggleMessage = "Show Message Counter";
                    JMenuItem m_activationCountMenuItem = new JMenuItem(activationCountToggleMessage);
                    m_activationCountMenuItem.setAction(new ToggleEdgeActivationCountMessageAction(mEdge));
                    popup.add(m_activationCountMenuItem);
                    popup.show(vv, me.getX(), me.getY());
                    popup.pack();
          }The problem is with the JMenuItems that use setAction instead of addActionListener (m_centerVertex and m_activationCountMenuItem). These two JMenuItems are in the popup menu list, but the popup menu is not large enough for me to see the labels given to m_centerVertex and m_activationCountMenuItem.
Anyone know what I'm doing wrong?
m_SetAdvMenuItem and m_SetSubMenuItem display correctly. It's as if the height of m_centerVertex and m_activationCountMenuItem are set at a value of 0 but the heights of the other two JMenuItems are the correct height.
Message was edited by:
themiddle

Did you set a name value in your Actions? The name value will be used to set the text. If its null that may account for the small size of the menu item.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

Similar Messages

  • Jpopupmenu, jmenuitem, jmenu... transparent

    I have extended JPopupmenu, JMenuItem, and JMenu in order to obtain some behaivier (transparent menus). Im having this prob. that the JMenu creates a normal JPopupMenu, where I would like it to use my extended JPopupMenu. I thought about overriding the method in JMenu which creates the JPopupMenu, but the JPop is private in jmenu. How to do this? I could ofcourse copy all the code of the jmenu class and just change the creation of the jpopupmenu, but that is probably illegal or something. Any ideas?
    Stig.

    I have the same problem.
    I run my code in jdk1.3 and it works great. But in 1.4, the transparency is gone, and depeneding on the implementation, the repainting sometimes gets real crazy.

  • Q10 Screen Sizing Problem in Blackberry 10.3

    Has anyone else noticed that there seems to be a screen sizing problem in Blackberry 10.3.
    When you wake the screeen with a gesture or pull the handset from the Q10 pocket, the screen that it "wakes" up to is enlarged, requiring the user to use the finger gestures to shrink it down to regular size.
    Or have I just not mastered 10.3 yet?
    Rgds
    E.T.
    Solved!
    Go to Solution.

    Hi Folks,
    I've sussed this one out!
    It is not a problem with the screen resolution or the software update, I had within the accessibility settings the "Magnify Mode" enabled.
    Disable this and the screen behaves perfectly..........
    False Alarm. Sorry!
    Revert to Defcon 5...........   :-)

  • Line Sizing Problem

    I am running several reports to produce PDFs that have an interesting behavior. When I publish a report out to our reports server, text in a text box is showing up at or near the top of the box that contains it. This report output does not look very good. On my desktop environment, when I run the report it produces a PDF with no sizing issues.
    I have read in several places that this might be a postscipt printer issue. So, I switched the printer on the report server machine to a postscript printer but it did not fix the problem. The font that I am using is Arial as that is the standard font that the client uses. The report server is 6. Any recommendations are appreciated.
    Thanks,
    Greg

    Greg,
    This is probably that server is not using the printer fonts for formatting and uses the system fonts.
    Please ensure you use the same printer / similar driver for both the desktop and server to see the effect.
    Also, the server if you run as service, by default it runs in the system login and the defaukt printer wouldn't be accessible. Please go to the services properties and ensure the login account has admin privilages to access the printer
    Thanks
    The Oracle Reports Team

  • JMenuItem.setIcon problem

    When I create a JMenuItem and add an icon, the menu item text is greyed out (it's not disabled). When I remove the setIcon, the text appears normally. This is L&F independent.
    I've tried various things to force the foreground color to black, but nothing works.
    I'm using JRE 1.4.2_04.
    Any suggestions?
    Thanks
    Ross

    Now that I think about it, I remember that there are quite a few problems with setting button background colors due to conflicts with Windows desktop styles and the native button code. I assume that's involved here since JMenuItems are buttons.
    However, in this particular case, I'm not trying to set any colors, just setting an icon. Why wouldn't that work?

  • JMenuItem painting Problem

    Hi,
    I have painting problem with adding the JMenuItems dynamically. In the screen1 figure shown below, Menu 2 has has total 10 items, but initially we will show only three items. When the user clicks on the menu item ">>" all the Ten Items in Menu 2 are shown. But, All the 10 items are inserted in a compressed manner as shown in screen 2. When i click on the Menu 2 again, is shows properly as shown in screen 3.
    screen 1:
    <img src="http://img.photobucket.com/albums/v652/petz/Technical/screen1.jpg" border="0" alt="Screen 1"/>
    screen 2:
    <img src="http://img.photobucket.com/albums/v652/petz/Technical/screen2.jpg" border="0" alt="Screen 2"/>
    screen 3:
    <img src="http://img.photobucket.com/albums/v652/petz/Technical/screen3.jpg" border="0" alt="Screen 3"/>
    Here is the code:
    import java.awt.GridLayout;
    import java.awt.event.KeyEvent;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    public class MenuUI implements MouseListener
        JFrame frame;
        JMenuBar menubar;
        JMenu menu1,menu2;
        JMenuItem menuItem;
        JMenuItem lastMenuItem;
        String MENU1_ITEMS[] = {"ONE","TWO","THREE","FOUR","FIVE"};
        String MENU2_ITEMS[] = {"ONE","TWO","THREE","FOUR","FIVE","SIX","SEVEN","EIGHT","NINE","TEN"};
        int MIN_MENU = 3;
        public MenuUI()
            menubar = new JMenuBar();
            /*menu1 = new JMenu("Menu 1");
            menu1.setMnemonic(KeyEvent.VK_1);
            menu1.getPopupMenu().setLayout(new GridLayout(5,1));
            menu2 = new JMenu("Menu 2");
            menu2.setMnemonic(KeyEvent.VK_2);
            menu2.getPopupMenu().setLayout(new GridLayout(5,2));*/
            menu1 = new JMenu("Menu 1");
            menu1.setMnemonic(KeyEvent.VK_1);
            menu2 = new JMenu("Menu 2");
            menu2.setMnemonic(KeyEvent.VK_2);
            menubar.add(menu1);
            menubar.add(menu2);
            createMinMenuItems();
            frame = new JFrame("MenuDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setJMenuBar(menubar);
            frame.setSize(500, 300);
            frame.setVisible(true);
        public void createMinMenuItems()
            for (int i = 0; i < MIN_MENU; i++)
                menuItem = new JMenuItem(MENU1_ITEMS);
    menu1.add(menuItem);
    lastMenuItem = new JMenuItem(">>");
    lastMenuItem.addMouseListener(this);
    menu1.add(lastMenuItem);
    for (int i = 0; i < MIN_MENU; i++)
    menuItem = new JMenuItem(MENU2_ITEMS[i]);
    menu2.add(menuItem);
    lastMenuItem = new JMenuItem(">>");
    lastMenuItem.addMouseListener(this);
    menu2.add(lastMenuItem);
    private void showAllMenuItems(int menuNo)
    if(menuNo == 1)
    menu1.remove(MIN_MENU);
    for (int i = MIN_MENU; i < MENU1_ITEMS.length; i++)
    menuItem = new JMenuItem(MENU1_ITEMS[i]);
    menu1.add(menuItem);
    menu1.updateUI();
    else if(menuNo == 2)
    menu2.removeAll();
    menu2.getPopupMenu().setLayout(new GridLayout((MENU2_ITEMS.length),1));
    for (int i = 0; i < MENU2_ITEMS.length; i++)
    menuItem = new JMenuItem(MENU2_ITEMS[i]);
    //menuItem.setMinimumSize(new Dimension(35,20));
    menu2.add(menuItem);
    menu2.updateUI();
    //menu2.getPopupMenu().invalidate();
    //menu2.getPopupMenu().repaint();
    //menubar.repaint();
    //menubar.invalidate();
    //menubar.getParent().repaint();
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
    public void mousePressed(MouseEvent arg0)
    System.out.println("mousePressed: Menu 1 selected: "+menu1.isSelected());
    System.out.println("mousePressed: Menu 2 selected: "+menu2.isSelected());
    if(menu1.isSelected())
    System.out.println("mousePressed: Menu 1: Show All Items");
    showAllMenuItems(1);
    else if(menu2.isSelected())
    System.out.println("mousePressed: Menu 2: Show All Items");
    showAllMenuItems(2);
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
    public void mouseClicked(MouseEvent evt)
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
    public void mouseEntered(MouseEvent arg0)
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
    public void mouseExited(MouseEvent arg0)
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
    public void mouseReleased(MouseEvent arg0)
    public static void main(String[] args)
    MenuUI ui = new MenuUI();

    // menu2.updateUI();
    menu2.getPopupMenu().setVisible(false);
    menu2.getPopupMenu().setVisible(true);

  • Compressor 2 Quicktime to iPod Sizing Problem

    Hello,
    As a podcaster, I have to convert regular quicktime files into iPod-compatible m4v format all the time. Usually I use Quicktime Pro to do this - its simple and I havent had any problems with it. But I'm looking for ways to reduce my file sizes, so I was looking into using Compressor for this.
    I used the new H.264 iPod video setting, but got an unsatifactory result that mystifies me:
    720x480 quicktime file, when converted via Quicktime Pro's iPod conversion, becomes 320x213 and looks fine.
    The same file, when run through Compressor's iPod setting, goes to 320x240, BUT it looks stretched vertically.
    Any ideas why this might be happening?
    Thanks,
    Simon

    Actually, 320x240 is the correct aspect ratio for playback on a computer display. NTSC TV is a 4:3 aspect ratio so the correct viewing format for your 720x480 clip is actually 640x480 (note that the latter is a 4:3 ratio). This confusion results from the fact that NTSC TV displays use rectangular pixels while computer display pixels are usually square. Thus, in order to get the correct aspect ratio during playback on a computer's square pixels you need to set the video to 640x480 or 320x240. However, if you plan on viewing the output on a NTSC TV then either 720x480 or 320x213 are acceptable since both of those will result in a 4:3 viewing ratio during full screen playback on the TV (the conversion happens "auto-magically" -- in effect -- since a standard definition TV has a 4:3 aspect ratio).
    Note further that the iPod video display is 320x240 (also 4:3) so I'd suspect that the best quality playback on the iPod would be obtained with a similar sized movie.

  • JPopupMenu or mouseReleased problem

    Java rookie here so bear with me. Trying out a swing popupmenu by right clicking I get:
    java.lang.NullPointerException
    at PresentingLife$MouseWatcher.mouseReleased(PresentingLife.java:580)
    every time I release the mouse button in my jpanel and the popup menu never appears, but the cordinates do. I'm sure I'm missing something small.
    Here's all the code that applies to:
    JPopupMenu popup1 = new JPopupMenu();
    popup1.setVisible(true);
    JMenuItem item = new JMenuItem("Add Image");
         item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.CTRL_MASK));
    item.setMnemonic(KeyEvent.VK_I);
         popup1.add(item);
         item.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    addImageMenuItemActionPerformed(evt);
         item = new JMenuItem("Add Text");
         item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, Event.CTRL_MASK));
         item.setMnemonic(KeyEvent.VK_T);
         popup1.add(item);
         item.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    addTextMenuItemActionPerformed(evt);
    item = new JMenuItem("Delete Image");
         item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, Event.CTRL_MASK));
         item.setMnemonic(KeyEvent.VK_T);
         popup1.add(item);
         item.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    deleteImageMenuItemActionPerformed(evt);
    MouseListener mouser = new MouseWatcher();
              jPanel4.addMouseListener(mouser);
              addMouseListener(mouser);
    private class MouseWatcher extends MouseAdapter
         {     public void mouseClicked(MouseEvent e)
              {     Graphics g = e.getComponent().getGraphics();
                   int x = e.getX(), y = e.getY();
                   if(e.getModifiers() == InputEvent.BUTTON3_MASK)
                   {     Font font = new Font("Serif",  Font.ITALIC, 10);
                        g.setFont(font);
                        g.setColor(Color.red);
                        g.drawString("Right Click at:(" + x + "," + y + ")", x, y);
                   else // Other buttons.
                   {     g.drawString("Left Clickat:(" + x + "," + y + ")", x, y);     
                   g.dispose();
              public void mousePressed(MouseEvent e)
              {     int x = e.getX(), y = e.getY();
                   if (e.isPopupTrigger())
                   {     popup1.show(e.getComponent(), x, y);     
              public void mouseReleased(MouseEvent e)
              {     int x = e.getX(), y = e.getY();
                   if (e.isPopupTrigger())
                   {     popup1.show(e.getComponent(), x, y);     
    Thank You

    It looks to me like popup1 must be null. You must be redefining it in your 'MouseWatcher' class.

  • How to fix a DataGrid headercolumn's headerText causing sizing problems

    Hello,
    I have a datagrid with filter textboxes underneath the header columns.
    My problem is that some of the headerText is rather large (in 2 of my columns), and causes it to wrap and stretch the header's height, which ultimately causes the columns to match up strangely and not in uniform.
    Here is a screenshot of the problem:
    http://img685.imageshack.us/img685/2283/gridcolumnsizeproblem.png
    How can I make all column headings uniform in size, with my filtering text boxes? I do not see a height property. I have tried to add extra spaces in the smaller column headings but that does nothing as I think FLEX parses that out. Can I specifically size these so they match the longer ones?
    Keep in mind, this DataGrid uses a custom renderer.
    Here is my grid definition/MXML:
                <dataGridFilters:FilterDatagrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{deviceDataColl}" click="dg_clickHandler(event)" >
                    <dataGridFilters:columns>
                        <dataGridFilters:DataGridFilterColumn dataField="name" headerText="Name" width="150"/>
                        <!--<dataGridFilters:DataGridFilterColumn dataField="deviceType" headerText="Device Type" textAlign="right"/>-->
                        <dataGridFilters:DataGridFilterColumn dataField="tHeat"   headerText="Heat Point" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="tCool" headerText="Cool Point" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="tIndoor" headerText="Indoor Temp" width="80" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="tOutdoor" headerText="Outdoor Temp" width="90" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="insideHumidity" headerText="Indoor Humidity" width="100"  textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentFState" headerText="Fan State" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentFMode" headerText="Fan Mode"  width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentTState" headerText="State" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="currentTMode" headerText="Mode" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTDate" headerWordWrap="false" headerText="Next Scheduled Control Point Transition Date" width="100" textAlign="right"/>
                        <!--<dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTTime" headerText="Next Scheduled Control Point Transition Time" width="100" textAlign="right"/>-->
                        <dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTTemp" headerWordWrap="false" headerText="Next Scheduled Control Point Transition Temp" width="100" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="groupOne" headerText="Group 1" width="75" textAlign="right"/>
                        <dataGridFilters:DataGridFilterColumn dataField="groupTwo" headerText="Group 2" width="75" textAlign="right"/>                   
                    </dataGridFilters:columns>
                </dataGridFilters:FilterDatagrid>
    Any help is greatly appreciated!
    Thank you,
    Devtron

    Rootsounds,
    Here is my headerRenderer class:
    package filters.header
        import mx.controls.dataGridClasses.DataGridHeader;
        import mx.core.mx_internal;
        use namespace mx_internal;
        public class DataGridFilterHeader extends DataGridHeader
            public function DataGridFilterHeader()
                super();
             *re-position the sort icon
            override protected function placeSortArrow():void
                super.placeSortArrow();
                if(sortArrow)
                    var hh:Number = cachedHeaderHeight;
                    sortArrow.y = (hh - sortArrow.measuredHeight - 8) > 0 ? 10: 0;
                    if(sortArrow.visible)
                        var n:int = headerItems.length;
                        for (var i:int = 0; i < n; i++)
                            if(visibleColumns[i].colNum == dataGrid.sortIndex)
                                headerItems[i].setActualSize(visibleColumns[i].width - sortArrow.measuredWidth + 5, headerItems[i].height);
    Here is my dataGrid extender:
    package filters
        import filters.header.DataGridFilterHeader;
        import flash.events.Event;
        import mx.collections.ICollectionView;
        import mx.controls.DataGrid;
        import mx.controls.dataGridClasses.DataGridColumn;
        import mx.core.mx_internal;
        use namespace mx_internal;
        public class FilterDatagrid extends DataGrid
            public function FilterDatagrid()
                super();
                headerClass = DataGridFilterHeader;
                addEventListener("filterEvent",onFilterChange);
            override public function set dataProvider(value:Object):void
                if(dataProvider)
                    resetFiltres();
                super.dataProvider = value;
                resetFiltres(filterFunction);
            private function  onFilterChange(event:Event):void
                if(dataProvider)
                    (dataProvider as ICollectionView).refresh();
                selectedIndex = 0;
            private function resetFiltres(inFilterFunction:Function = null):void
                if(dataProvider)
                    (dataProvider as ICollectionView).filterFunction = inFilterFunction;
                    (dataProvider as ICollectionView).refresh();
                if(inFilterFunction == null)
                    var iLen:int= columnCount;
                    for(var i:int=0;i<iLen;i++)
                        var dgc:DataGridColumn = columns[i] as DataGridColumn;
                        if(dgc is DataGridFilterColumn)
                            DataGridFilterColumn(dgc).filterText = "";
                selectedIndex = 0;
            private function filterFunction(inObject:Object):Boolean
                var iLen:int= columnCount;
                for(var i:int=0;i<iLen;i++)
                    var dgc:DataGridColumn = columns[i] as DataGridColumn;
                    var dField:String = dgc.dataField;
                    if(dgc is DataGridFilterColumn == false)
                        continue;
                    var srchStr:String =  DataGridFilterColumn(dgc).filterText;
                    if(srchStr == "")
                        continue;
                    var dataStr:String = dgc.itemToLabel(inObject);
                    var regex:RegExp = new RegExp("^"+srchStr, "i");
                    // if search string exists and
                    // does not match the data in the row
                    if(regex.exec(dataStr)==null)
                        return false;
                return true;
    If all this wrapper class stuff "Extends" the DataGrid, why wouldnt "headerHeight" be available as an attribute in my MXML/grid? When I try to set it explicitly in my dataGrid MXML, the compiler says "Cannot resolve attribute 'headerHeight'". I guess this doesnt really "extend" it? Im confused.

  • Acrobat Pro 9 TextBox Text Sizing problems

    I have recently installed Pro9 in my computer, previously I had Ver 6.
    Before Adobe Acrobat Pro 9, I could insert a TextBox in any PDF file and format the text right on the spot (i.e. size, color, style).
    Now with the new Pro 9, I can not edit the TextBox font. In order to change it I have to go another application and then do the changes there, then cut and paste into the PDF TextBox.
    Is anyone else having this problem or is just my application? do you have any suggestions?
    Thanks

    Hi ,
    This seems to be an issue specific to the file you are using . Does it happen for any file with tables ?
    If possible can you please share the file converting which you encountered such behavior . Please also mention your OS ,version of Acrobat and MSOffice version .
    Thanks,
    Apoorv

  • AS2 component sizing problem

    I experiencing a problem with the AS2 (V2) components named
    Datagrid and List. Is there a way to resize the using actionscript
    just to display more datas instead of scaling or stretching to the
    new size but still displaying the same amount of visible data.
    See? when change their size in action script, they scale or
    stretch, but I want to them to keep their aspect and offer to view
    more items at once.
    Any help will be appreciated

    Don't use _width or _height to change the size if that's what
    you're doing.
    myGrid.setSize(width, height);
    as an example if your Datagrid is called myGrid.

  • Sizing problem in JEditorPane

    I am tryying to set the size of JEditorPane using setSize(int w, int h) method, but it isn' working. The pane is rendered as just about a single character height even though I have given higher values (about 500) for height. Any idea what could be wrong?

    Hi,
    Refer these links:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2016a0b1-1780-2b10-97bd-be3ac62214c7
    /people/boris.zarske/blog/2007/06/13/sizing-a-system-for-the-system-landscape-directory-of-sap-netweaver
    /people/william.li/blog/2008/03/07/step-by-step-guide-in-processing-high-volume-messages-using-pi-71s-message-packaging
    http://help.sap.com/saphelp_nwpi71/helpdata/en/46/79e8e13872275ae10000000a11466f/frameset.htm
    Regards,
    Nithiyanandam

  • IPhoto Printing - sizing problems

    After many hours of frustration I am about to give up on iPhoto 7.1 printing. The Print Settings dialog does not match the choices of settings or paper sizes of my printer. I enter a custom size [tedious to have to do when it is a standard photo paper size such as "L"], enter, then when I add a border the paper size reverts to A4. If I don't add a border or otherwise customize the picture, then go to "print" on checking the advanced print options the paper size does not match that set in the "Print Settings" dialog. Even if the preview looks right the print size does not match. I called into my local Apple store and tried this at the Genius Bar - they found the same issue on their Mac and after an hour of head scratching they could not figure it out. Any thoughts? This should be dead easy - I am back to adding borders in PS and printing from Aperture; not what I want to do for snapshots.

    Daniel:
    Welcome to the Apple Discussions. Can you provide a little more info regarding the paper sizes available, printer type, etc. Not familiar with paper size "\L\". What language is you Mac set up for? What sizes are you trying to print? Are you cropping the images to the paper size selected beforehand?
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • JDialog sizing problems

    First of all, just let me say I have read everything there is available on layout managers and how pack() and validate() work.
    My problem is simply that my JDialog appears far longer than its components, and I can't see why.
    I've created screenshots of the desired appearance and the actual appearance:
    http://www.komododave.co.uk/gallery/main.php?g2_itemId=167
    The first 'undesired' screenshot shows what the JDialog looks like upon instantiation. The second shows what it looks like once you manually shrink it in the Y direction by more than about 10 pixels.
    I don't understand how the maximum size can exceed the Dimension I set with 'dialog.setMaximumSize(...', since I'm using BoxLayout for the JDialog and that respects a given maximum size.
    The constructor creating the JDialog is shown here:
              public AbstractSelectionDialog(Vector<String> argVector, String title,
                        String message) {
                   Vector<String> vector = argVector;
                   // create new modal JDialog
                   final JDialog dialog = new JDialog(Silk.getFrame(), title, true);
                   // set boxlayout for dialog frame
                   dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(),
                             BoxLayout.Y_AXIS));
                   // set default close operation
                   dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
                   // create ButtonGroup to enforce exclusive collection choice
                   final ButtonGroup buttonGroup = new ButtonGroup();
                   // initialise other components
                   // use fake space for label rather than use another HorizontalGlue
                   JLabel label = new JLabel("   " + message);
                   // panel containing collection selection
                   JPanel selectionPanel = new JPanel();
                   // run initialiser methods
                   JPanel buttonPanel = (JPanel) createButtons(buttonGroup, dialog);
                   AbstractButton selection[] = createSelection(vector, buttonGroup,
                             selectionPanel);
                   // scrollPane containing collection panel
                   JScrollPane scrollPane = new JScrollPane(selectionPanel,
                             JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                             JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
                   // panel containing scroll pane
                   JPanel scrollPanel = new JPanel();
                   scrollPanel.setLayout(new BoxLayout(scrollPanel, BoxLayout.X_AXIS));
                   selectionPanel.setLayout(new GridLayout(vector.size(), 1));
                   // assemble component structure
                   scrollPanel.add(Box.createHorizontalGlue());
                   scrollPanel.add(scrollPane);
                   scrollPanel.add(Box.createHorizontalGlue());
                   dialog.add(label);
                   dialog.add(scrollPanel);
                   dialog.add(buttonPanel);
                   // set all components to be left-justified
                   label.setAlignmentX(0.0F);
                   scrollPanel.setAlignmentX(0.0F);
                   selectionPanel.setAlignmentX(0.0F);
                   buttonPanel.setAlignmentX(0.0F);
                   // set higher-level component sizes
                   Silk.setSizeAttributes(label, 300, 30, true);
                   selectionPanel.setMaximumSize(new Dimension(250, 400));
                   scrollPane.setMinimumSize(new Dimension(250, 50));
                   scrollPane.setMaximumSize(new Dimension(250, 400));
                   dialog.setMinimumSize(new Dimension(300, 200));
                   dialog.setMaximumSize(new Dimension(300, 500));
                   dialog.pack();
                   // set components to be opaque
                   label.setOpaque(true);
                   scrollPane.setOpaque(true);
                   selectionPanel.setOpaque(true);
                   // display dialog frame
                   //dialog.setResizable(false);
                   dialog.setVisible(true);
              }The 'createButtons' method it uses is here:
         public JPanel createButtons(ButtonGroup bg, JDialog jd) {
                   final ButtonGroup buttonGroup = bg;
                   final JDialog dialog = jd;
                   // confirmation buttons
                   JButton okBtn = new JButton();
                   JButton cancelBtn = new JButton();
                   JButton newBtn = new JButton();
                   // panel containing OK and CANCEL buttons
                   JPanel bothPanel = new JPanel();
                   // panel containing NEW COLLECTION button
                   JPanel newPanel = new JPanel();
                   // panel to contain all other button panels
                   JPanel confPanel = new JPanel();
                   confPanel.setLayout(new BoxLayout(confPanel, BoxLayout.X_AXIS));
                   newPanel.setLayout(new BoxLayout(newPanel, BoxLayout.X_AXIS));
                   bothPanel.setLayout(new BoxLayout(bothPanel, BoxLayout.Y_AXIS));
                   // definition of button Actions
                   okBtn.setAction(new AbstractAction() {
                        public void actionPerformed(ActionEvent ae) {
                             Actions.addScript(buttonGroup.getSelection()
                                       .getActionCommand(), null);
                             dialog.dispose();
                   cancelBtn.setAction(new AbstractAction() {
                        public void actionPerformed(ActionEvent ae) {
                             dialog.dispose();
                   newBtn.setAction(new AbstractAction() {
                        public void actionPerformed(ActionEvent ae) {
                             dialog.dispose();
                             new Actions.NewCollectionAction().actionPerformed(ae);
                             new Actions.NewScriptAction().actionPerformed(ae);
                   // override action-set button text
                   okBtn.setText("Ok");
                   cancelBtn.setText("Cancel");
                   newBtn.setText("Add New Collection");
                   // set button sizes
                   Silk.setSizeAttributes(okBtn, 115, 30, true);
                   Silk.setSizeAttributes(cancelBtn, 115, 30, true);
                   Silk.setSizeAttributes(newBtn, 250, 35, true);
                   // set opaque buttons
                   confPanel.setOpaque(true);
                   okBtn.setOpaque(true);
                   cancelBtn.setOpaque(true);
                   // assemble components
                   confPanel.add(Box.createHorizontalGlue());
                   confPanel.add(okBtn);
                   confPanel.add(Box.createRigidArea(new Dimension(20, 0)));
                   confPanel.add(cancelBtn);
                   confPanel.add(Box.createHorizontalGlue());
                   newPanel.add(Box.createHorizontalGlue());
                   newPanel.add(newBtn);
                   newPanel.add(Box.createHorizontalGlue());
                   bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
                   bothPanel.add(confPanel);
                   bothPanel.add(Box.createRigidArea(new Dimension(0, 5)));
                   bothPanel.add(newPanel);
                   bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
                   bothPanel.setMaximumSize(new Dimension(300, 100));
                   return bothPanel;
              }And the createSelection() method it uses is defined here:
         public AbstractButton[] createSelection(Vector<String> argVector,
                        ButtonGroup buttonGroup, JPanel selectionPanel) {
                   Vector<String> vector = argVector;
                   JRadioButton selection[] = new JRadioButton[vector.size()];
                   for (int i = 0; i < vector.size(); i++)
                        selection[i] = new JRadioButton(vector.get(i));
                   AbstractButton current;
                   for (byte i = 0; i < selection.length; i++) {
                        current = selection;
                        // set action command string to later identify button that's
                        // selected
                        current.setActionCommand(vector.get(i));
                        // fix button's size
                        Silk.setSizeAttributes(current, 250, 30, true);
                        // set button's colour
                        current.setBackground(Color.WHITE);
                        // add button to buttongroup
                        buttonGroup.add(current);
                        // add button to appropriate JPanel
                        selectionPanel.add(current);
                   // ensure one button is selected to prevent pressing OK with no
                   // selection
                   selection[0].setSelected(true);
                   return selection;
    Please help if you can.
    Thank you.
    - Dave

    Yeah sorry camickr, I need to get into the habit of posting SSCCEs.
    Here it is in SSCCE form:
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.AbstractButton;
    import javax.swing.Box;
    import javax.swing.BoxLayout;
    import javax.swing.ButtonGroup;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JRadioButton;
    import javax.swing.JScrollPane;
    import java.util.Vector;
    public class Testing {
         // prevent instantiation
         private Testing() {
         public interface SelectionDialog {
              // produces a component containing all dialog buttons
              public Component createButtons(ButtonGroup bg, JDialog jd);
              // produces an array of the selection buttons to be used
              public abstract AbstractButton[] createSelection(
                        Vector<String> selectionVector, ButtonGroup buttonGroup,
                        JPanel selectionPanel);
         abstract static class AbstractSelectionDialog implements SelectionDialog {
              public AbstractSelectionDialog() {
                   Vector<String> vector = new Vector<String>();
                   String title = "Broken dialog box";
                   String message = "Why is the maximum size exceedable, hmm?";
                   /* for sscce */
                   vector.add("choice 1");
                   vector.add("choice 2");
                   vector.add("choice 3");
                   vector.add("choice 4");
                   vector.add("choice 5");
                   vector.add("choice 6");
                   vector.add("choice 7");
                   vector.add("choice 8");
                   vector.add("choice 9");
                   vector.add("choice 10");
                   vector.add("choice 11");
                   vector.add("choice 12");
                   vector.add("choice 13");
                   vector.add("choice 14");
                   vector.add("choice 15");
                   vector.add("choice 16");
                   vector.add("choice 17");
                   vector.add("choice 18");
                   // create new modal JDialog
                   final JDialog dialog = new JDialog(Silk.getFrame(), title, true);
                   // set boxlayout for dialog frame
                   dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(),
                             BoxLayout.Y_AXIS));
                   // set default close operation
                   dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
                   // create ButtonGroup to enforce exclusive collection choice
                   final ButtonGroup buttonGroup = new ButtonGroup();
                   // initialise other components
                   // use fake space for label rather than use another HorizontalGlue
                   JLabel label = new JLabel("   " + message);
                   // panel containing collection selection
                   JPanel selectionPanel = new JPanel();
                   // run initialiser methods
                   JPanel buttonPanel = (JPanel) createButtons(buttonGroup, dialog);
                   AbstractButton selection[] = createSelection(vector, buttonGroup,
                             selectionPanel);
                   // scrollPane containing collection panel
                   JScrollPane scrollPane = new JScrollPane(selectionPanel,
                             JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                             JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
                   // panel containing scroll pane
                   JPanel scrollPanel = new JPanel();
                   scrollPanel.setLayout(new BoxLayout(scrollPanel, BoxLayout.X_AXIS));
                   selectionPanel.setLayout(new GridLayout(vector.size(), 1));
                   // assemble component structure
                   scrollPanel.add(Box.createHorizontalGlue());
                   scrollPanel.add(scrollPane);
                   scrollPanel.add(Box.createHorizontalGlue());
                   dialog.add(label);
                   dialog.add(scrollPanel);
                   dialog.add(buttonPanel);
                   // set all components to be left-justified
                   label.setAlignmentX(0.0F);
                   scrollPanel.setAlignmentX(0.0F);
                   selectionPanel.setAlignmentX(0.0F);
                   buttonPanel.setAlignmentX(0.0F);
                   // set higher-level component sizes
                   Silk.setSizeAttributes(label, 300, 30, true);
                   selectionPanel.setMaximumSize(new Dimension(250, 400));
                   scrollPane.setMinimumSize(new Dimension(250, 50));
                   scrollPane.setMaximumSize(new Dimension(250, 400));
                   dialog.setMinimumSize(new Dimension(300, 200));
                   dialog.setMaximumSize(new Dimension(300, 500));
                   dialog.pack();
                   // set components to be opaque
                   label.setOpaque(true);
                   scrollPane.setOpaque(true);
                   selectionPanel.setOpaque(true);
                   // display dialog frame
                   // dialog.setResizable(false);
                   dialog.setVisible(true);
         protected static class ChooseCollectionDialog extends
                   AbstractSelectionDialog implements SelectionDialog {
              public ChooseCollectionDialog() {
                   super();
              public JPanel createButtons(ButtonGroup bg, JDialog jd) {
                   final ButtonGroup buttonGroup = bg;
                   final JDialog dialog = jd;
                   // confirmation buttons
                   JButton okBtn = new JButton();
                   JButton cancelBtn = new JButton();
                   JButton newBtn = new JButton();
                   // panel containing OK and CANCEL buttons
                   JPanel bothPanel = new JPanel();
                   // panel containing NEW COLLECTION button
                   JPanel newPanel = new JPanel();
                   // panel to contain all other button panels
                   JPanel confPanel = new JPanel();
                   confPanel.setLayout(new BoxLayout(confPanel, BoxLayout.X_AXIS));
                   newPanel.setLayout(new BoxLayout(newPanel, BoxLayout.X_AXIS));
                   bothPanel.setLayout(new BoxLayout(bothPanel, BoxLayout.Y_AXIS));
                   // definition of button Actions
                   okBtn.setAction(new AbstractAction() {
                        public void actionPerformed(ActionEvent ae) {
                             dialog.dispose();
                   cancelBtn.setAction(new AbstractAction() {
                        public void actionPerformed(ActionEvent ae) {
                             dialog.dispose();
                   newBtn.setAction(new AbstractAction() {
                        public void actionPerformed(ActionEvent ae) {
                   // override action-set button text
                   okBtn.setText("Ok");
                   cancelBtn.setText("Cancel");
                   newBtn.setText("Add New Collection");
                   // set button sizes
                   Silk.setSizeAttributes(okBtn, 115, 30, true);
                   Silk.setSizeAttributes(cancelBtn, 115, 30, true);
                   Silk.setSizeAttributes(newBtn, 250, 30, true);
                   // set opaque buttons
                   confPanel.setOpaque(true);
                   okBtn.setOpaque(true);
                   cancelBtn.setOpaque(true);
                   // assemble components
                   confPanel.add(Box.createHorizontalGlue());
                   confPanel.add(okBtn);
                   confPanel.add(Box.createRigidArea(new Dimension(20, 0)));
                   confPanel.add(cancelBtn);
                   confPanel.add(Box.createHorizontalGlue());
                   newPanel.add(Box.createHorizontalGlue());
                   newPanel.add(newBtn);
                   newPanel.add(Box.createHorizontalGlue());
                   bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
                   bothPanel.add(confPanel);
                   bothPanel.add(Box.createRigidArea(new Dimension(0, 5)));
                   bothPanel.add(newPanel);
                   bothPanel.add(Box.createRigidArea(new Dimension(0, 10)));
                   bothPanel.setMaximumSize(new Dimension(300, 100));
                   return bothPanel;
              public AbstractButton[] createSelection(Vector<String> argVector,
                        ButtonGroup buttonGroup, JPanel selectionPanel) {
                   Vector<String> vector = argVector;
                   JRadioButton selection[] = new JRadioButton[vector.size()];
                   for (int i = 0; i < vector.size(); i++)
                        selection[i] = new JRadioButton(vector.get(i));
                   AbstractButton current;
                   for (byte i = 0; i < selection.length; i++) {
                        current = selection;
                        // set action command string to later identify button that's
                        // selected
                        current.setActionCommand(vector.get(i));
                        // fix button's size
                        Silk.setSizeAttributes(current, 250, 30, true);
                        // set button's colour
                        current.setBackground(Color.WHITE);
                        // add button to buttongroup
                        buttonGroup.add(current);
                        // add button to appropriate JPanel
                        selectionPanel.add(current);
                   // ensure one button is selected to prevent pressing OK with no
                   // selection
                   selection[0].setSelected(true);
                   return selection;
         public static void main(String args[]) {
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        new ChooseCollectionDialog();
    I considered that the GridLayout might be a problem, but surely the fact that it's ultimately contained in a BoxLayout (which [i]does respect maximum size) means the maximum size still shouldn't be exceedable?
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Photoshop to illustrator sizing problem

    Hello All,
    This should be fairly simple, but I haven't had this problem before. I have a photo that I need to increase the size of the canvass and add a black vignette around,  then update this file in illustrator where it is placed. Every time I change the canvas size in photoshop and update in illustrator the photoshop image shrinks instead of getting bigger  (I have not changed the dpi or anything else except the canvas size). I've adjusted many images in photoshop and brought them into illustrator with no problem.  This is very strange....anyone have any ideas?
    Thanks!
    H

    You can scale an image to whatever size you want in Illustrator. If you take an 8x10 image and scale it down 50%, no matter what you do with the image in photoshop, the graphic element in illustrator will stay as a 4x5 dimension. It's not often one would want the parameters they have designed in one piece of software to be affected by what they do to the elements in another piece of software!
    Instead of simply updating the link to the image that is already placed in illustrator, you should place the image again (File-Place), and it will come in at 100% of it's (new) size,  same as any other image.

Maybe you are looking for

  • Select from .. as of - using archived redo logs - 10g

    Hi, I was under the impression I could issue a "Select from .. as of" statement back in time if I have the archived redo logs. I've been searching for a while and cant find an answer. My undo_management=AUTO, database is 10.2.0.1, the retention is th

  • How can I clean up my artwork?

    I have a new podcast.  The individual episode artwork shows up, but there is no artwork for the entire podcast.  Also, when in iTunes, one of the episode's artwork appears as the entire podcast's artwork.  How can I change these????

  • SIK Transport files and None unicode SAP system

    Dear all, I have a question about SIK Transport files. As you know, when we install BOE SIK,we need transport some files into SAP system. There is  a TXT file for describing how to use SIK transport files in SAP system. I found that there is no detai

  • User Properties

    Is there a way to change user properties assigned to nodes during runtime. For example, I have a user property 'Tooltip' assigned to few nodes and I display it using a UI element. I want to change this property based on selection of the options. Is t

  • OBIEE AVGDISTINCT in RPD

    Hi I cannot find the AVGDISTINCT aggregate function in the drop down list in the RPD. I've looked in the properties of the physical database and it's not there either (things like 'COUNT_DISTINCT_SUPPORTED' etc.). The 11.1.1 docs include it, and I qu