Suitable layout manager for adding JToolbar?

Hi there,
I'm new to Java Swing. I'm looking to add a toolbar to the top of a JFrame. I've created a Grid layout with 3 rows and no columns. I've placed the JToolbar in the first row. Unfortunately, each row in the grid is of equal size so the toolbar is stretched to 1/3rd the size of the JFrame. I want to the toolbar to be standard size but I don't know how to resize the grid rows. I don't want to have to add more rows to reduce the size.
Can anyone help me here? Or if you have a better layout manager suggestion.
Thanks,
Sean

You can use the default BorderLayout of JFrame and add your JToolBar to the North.

Similar Messages

  • Layout manager for a Windows type toolbar

    I have made a layout manager that when there is not enough room to put all the buttons it stores them inside a "subMenu" that appears at the end of the tool bar. Unfortunally the perfered size is not being calculated correctly so when the user makes the toolbar floatable it doesn't make the toolbar long enough.
    Here is my code:
    * ExpandLayout.java
    * Created on May 29, 2003, 3:17 PM
    package edu.cwu.virtualExpert.caseRecorder;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    * @author  subanark
    public class ExpandLayout implements java.awt.LayoutManager
        private JPopupMenu extenderPopup = new JPopupMenu();
        private JButton extenderButton = new JButton(new PopupAction());
        /** Creates a new instance of ExpandLayout */
        public ExpandLayout()
        protected class PopupAction extends AbstractAction
            public PopupAction()
                super(">");
            public void actionPerformed(ActionEvent e)
                JComponent component = (JComponent)e.getSource();
                extenderPopup.show(component,0,component.getHeight());
        /** If the layout manager uses a per-component string,
         * adds the component <code>comp</code> to the layout,
         * associating it
         * with the string specified by <code>name</code>.
         * @param name the string to be associated with the component
         * @param comp the component to be added
        public void addLayoutComponent(String name, Component comp)
         * Lays out the specified container.
         * @param parent the container to be laid out
        public void layoutContainer(Container parent)
            Dimension parentSize = parent.getSize();
            Dimension prefSize = preferredLayoutSize(parent);
            Insets insets = parent.getInsets();
            int x = insets.left;
            int y = insets.top;
            parentSize.width -= insets.right;
            int i;
            for(int j = 0; j < extenderPopup.getComponentCount();)
                Component aComponent = extenderPopup.getComponent(j);
                parent.add(aComponent);
            parent.remove(extenderButton);
            //System.out.println("Component count:"+parent.getComponentCount());
            for(i = 0; i < parent.getComponentCount() &&
                       parent.getComponent(i).getPreferredSize().width +(i==parent.getComponentCount()-1?0:extenderButton.getPreferredSize().width) + x < parentSize.width;i++)
                //System.out.println("exSize"+(parent.getComponent(i).getPreferredSize().width +extenderButton.getPreferredSize().width + x));
                Component aComponent = parent.getComponent(i);
                if(aComponent != extenderButton)
                    aComponent.setSize(aComponent.getPreferredSize());
                    aComponent.setLocation(x,y);
                    x += aComponent.getPreferredSize().width;
                    //System.out.println(aComponent.getX());
            if(i < parent.getComponentCount())
                while(i < parent.getComponentCount())
                    //System.out.println("Need Room");
                    extenderPopup.add(parent.getComponent(i));
                //System.out.println("extenderButton added");
                parent.add(extenderButton);
                extenderButton.setSize(extenderButton.getPreferredSize());
                extenderButton.setLocation(x,y);
                x += extenderButton.getPreferredSize().width;
                //System.out.println(extenderButton);
            else
                //System.out.println("extenderButton removed");
                parent.remove(extenderButton);
                //System.out.println("Component count:"+extenderButton.getComponentCount());
         * Calculates the minimum size dimensions for the specified
         * container, given the components it contains.
         * @param parent the component to be laid out
         * @see #preferredLayoutSize
        public Dimension minimumLayoutSize(Container parent)
            return extenderButton.getMinimumSize();
        /** Calculates the preferred size dimensions for the specified
         * container, given the components it contains.
         * @param parent the container to be laid out
         * @see #minimumLayoutSize
        public Dimension preferredLayoutSize(Container parent)
            Dimension d = new Dimension();
            d.width += parent.getInsets().right+parent.getInsets().left;
            for(int i = 0; i < parent.getComponents().length;i++)
                if(parent.getComponent(i) != extenderButton)
                    d.width+=parent.getComponent(i).getPreferredSize().width;
                    d.height = Math.max(d.height,parent.getComponent(i).getPreferredSize().height);
            for(int i = 0; i < extenderPopup.getComponentCount();i++)
                d.width+=extenderPopup.getComponent(i).getPreferredSize().width;
                d.height = Math.max(d.height,extenderPopup.getComponent(i).getPreferredSize().height);
            d.height += parent.getInsets().top+parent.getInsets().bottom+5;
            return d;
        /** Removes the specified component from the layout.
         * @param comp the component to be removed
        public void removeLayoutComponent(Component comp)
        public static void main(String[] argv)
            JFrame f = new JFrame();
            JToolBar toolBar = new JToolBar();
            toolBar.setLayout(new ExpandLayout());
            toolBar.add(new JButton("hello"));
            toolBar.add(new JButton("Hello2"));
            toolBar.add(new JButton("Hello3"));
            toolBar.add(new JButton("Hi"));
            f.getContentPane().setLayout(new BorderLayout());
            f.getContentPane().add(toolBar,BorderLayout.NORTH);
            f.setBounds(0,0,300,300);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setVisible(true);
    }

    This is a wierd one. I noticed that the width of a button is 22 pixels larger in the popup menu that it is in the toolbar.I traced this down to the insets being changed when the button is added to the toolbar. The strange part is that the size of the component keeps changing as you move it from the toolbar to the popup menu and back.
    Anyway, I ended up changing most of you code. Here is my version:
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    * @author subanark
    public class ExpandLayout implements java.awt.LayoutManager
         private JPopupMenu extenderPopup = new JPopupMenu();
         private JButton extenderButton = new JButton(new PopupAction());
         /** Creates a new instance of ExpandLayout */
         public ExpandLayout()
         /** If the layout manager uses a per-component string,
         * adds the component <code>comp</code> to the layout,
         * associating it
         * with the string specified by <code>name</code>.
         * @param name the string to be associated with the component
         * @param comp the component to be added
         public void addLayoutComponent(String name, Component comp)
         * Lays out the specified container.
         * @param parent the container to be laid out
         public void layoutContainer(Container parent)
              //  Position all buttons in the container
              Insets insets = parent.getInsets();
              int x = insets.left;
              int y = insets.top;
              int spaceUsed = insets.right + insets.left;
              for (int i = 0; i < parent.getComponentCount(); i++ )
                   Component aComponent = parent.getComponent(i);
                   aComponent.setSize(aComponent.getPreferredSize());
                   aComponent.setLocation(x,y);
                   int componentWidth = aComponent.getPreferredSize().width;
                   x += componentWidth;
                   spaceUsed += componentWidth;
              //  All the buttons won't fit, add extender button
              //  Note: the size of the extender button changes once it is added
              //  to the container. Add it here so correct width is used.
              int parentWidth = parent.getSize().width;
              if (spaceUsed > parentWidth)
                   parent.add(extenderButton);
                   extenderButton.setSize( extenderButton.getPreferredSize() );
                   spaceUsed += extenderButton.getSize().width;
              //  Remove buttons that don't fit and add to the popup menu
              while (spaceUsed > parentWidth)
                   int last = parent.getComponentCount() - 2;
                   Component aComponent = parent.getComponent( last );
                   parent.remove( last );
                   extenderPopup.insert(aComponent, 0);
                   extenderButton.setLocation( aComponent.getLocation() );
                   spaceUsed -= aComponent.getSize().width;
         * Calculates the minimum size dimensions for the specified
         * container, given the components it contains.
         * @param parent the component to be laid out
         * @see #preferredLayoutSize
         public Dimension minimumLayoutSize(Container parent)
              return extenderButton.getMinimumSize();
         /** Calculates the preferred size dimensions for the specified
         * container, given the components it contains.
         * @param parent the container to be laid out
         * @see #minimumLayoutSize
         public Dimension preferredLayoutSize(Container parent)
              //  Move all components to the container and remove the extender button
              parent.remove(extenderButton);
              while ( extenderPopup.getComponentCount() > 0 )
                   Component aComponent = extenderPopup.getComponent(0);
                   extenderPopup.remove(aComponent);
                   parent.add(aComponent);
              //  Calculate the width of all components in the container
              Dimension d = new Dimension();
              d.width += parent.getInsets().right + parent.getInsets().left;
              for (int i = 0; i < parent.getComponents().length; i++)
                   d.width += parent.getComponent(i).getPreferredSize().width;
                   d.height = Math.max(d.height,parent.getComponent(i).getPreferredSize().height);
              d.height += parent.getInsets().top + parent.getInsets().bottom + 5;
              return d;
         /** Removes the specified component from the layout.
         * @param comp the component to be removed
         public void removeLayoutComponent(Component comp)
         protected class PopupAction extends AbstractAction
              public PopupAction()
                   super(">");
              public void actionPerformed(ActionEvent e)
                   JComponent component = (JComponent)e.getSource();
                   extenderPopup.show(component,0,component.getHeight());
         public static void main(String[] argv)
              JFrame f = new JFrame();
              JToolBar toolBar = new JToolBar();
              toolBar.setLayout(new ExpandLayout());
              toolBar.add(new JButton("hello"));
              JButton button = new JButton("Hello2");
              System.out.println( button.getInsets() );
              toolBar.add(button);
              System.out.println( button.getInsets() );
              toolBar.add(new JButton("Hello3"));
              toolBar.add(new JButton("Hi"));
              f.getContentPane().setLayout(new BorderLayout());
              f.getContentPane().add(toolBar,BorderLayout.NORTH);
              f.setBounds(0,0,300,300);
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.setVisible(true);
    }

  • Cant find suitable Layout  Manager

    Hello!
    I am doing a project where i allow user to drag an area on frame and then I should put a new JtextArea on that area. I have used the setBounds method of JTextArea to specify the location points but becoz of the layout manager (Flow Layout) it automatically shifts to other place in the frame.
    I have tried using other layouts but none helps to keep the textarea at specified place. Plz help!!

    Hi,
    You need to set the layout manager to null. This will allow you to specify size/location using setBounds.
    Regards,
    Ahmed Saad

  • JTable's suitable Layout manager

    i have a JTable in a JPanel and another JPanel with JLabels and JTextFiled in it.
    * VersionControl.java
    * @author JPQuilala
    * Created on December 22, 2006, 1:18 PM
    package qis_dreamteam;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.beans.PropertyVetoException;
    import javax.swing.BorderFactory;
    import javax.swing.BoxLayout;
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.ListSelectionModel;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableModel;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class VersionControl extends JInternalFrame {
    JPanel pnlMain;
    JPanel pnlApp,pnlAppTblInput,pnlAppTbl,pnlAppInput,pnlAppLbl,pnlAppTxt;
    JPanel pnlHst,pnlHstTblInput,pnlHstTbl,pnlHstInput,pnlHstLbl,pnlHstTxt;
    JTable tblApp;
    JTable tblHst;
    JTextField[] txtApp=new JTextField[7];
    JTextField[] txtHst=new JTextField[7];
    JLabel[] lblApp=new JLabel[7];
    JLabel[] lblHst=new JLabel[7];
    JButton btnAppAdd,bntAppUpdate,btnAppDelete;
    JButton btnHstAdd,bntHstUpdate,btnHstDelete;
    PaoTableModel modelApp=new PaoTableModel("SELECT * FROM QIS_APPLICATION_MT");
    PaoTableModel modelHst=new PaoTableModel("SELECT * FROM QIS_APP_VERSION_HISTORY");
    public VersionControl(Dimension dSize) throws PropertyVetoException {     
    super("Version Control ",
    false, //resizable
    true, //closable
    false, //maximizable
    true); //iconifiable
    pnlMain=new JPanel();
    pnlApp=new JPanel();
    pnlAppTblInput=new JPanel();
    pnlAppTbl=new JPanel();
    pnlAppInput=new JPanel();
    pnlAppLbl=new JPanel();
    pnlAppTxt=new JPanel();
    pnlHst=new JPanel();
    pnlHstTblInput=new JPanel();
    pnlHstTbl=new JPanel();
    pnlHstInput=new JPanel();
    pnlHstLbl=new JPanel();
    pnlHstTxt=new JPanel();
    JPanel pnlHeader=new JPanel();
    tblApp=new JTable(modelApp);
    tblHst=new JTable(modelHst);
    JScrollPane scrollApp=new JScrollPane(tblApp);
    tblApp.setPreferredScrollableViewportSize(new Dimension(1000,100));
    JScrollPane scrollHst=new JScrollPane(tblHst);
    tblHst.setPreferredScrollableViewportSize(new Dimension(dSize.width,100));
    setContentPane(pnlMain);
    setSelected(true);
    tblApp.setAutoResizeMode(tblApp.AUTO_RESIZE_LAST_COLUMN);
    JLabel lblTitle=
    new JLabel("Hitachi Global Storage Technology Philippines Corp.");
    pnlHeader.setLayout(new FlowLayout());
    lblTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    lblTitle.setPreferredSize(new java.awt.Dimension (1100,25));
    lblTitle.setForeground(new java.awt.Color(255, 255, 255));
    lblTitle.setBackground(new java.awt.Color(215, 0, 0));
    lblTitle.setOpaque(true);
    pnlHeader.add(lblTitle);
    //pnlAppLbl
    pnlAppLbl.setLayout(new GridLayout(7,1,0,9));
    for(int i=0;i<7;i++) {
    pnlAppLbl.add(lblApp=new JLabel("Label "+i));
    //pnlAppTxt
    pnlAppTxt.setLayout(new GridLayout(7,1,0,5));
    for(int i=0;i<7;i++) {
    pnlAppTxt.add(txtApp[i]=new JTextField("",16));
    //pnlAppInput
    pnlAppInput.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createTitledBorder("Input :"),
    BorderFactory.createEmptyBorder(5,5,5,5)));
    pnlAppInput.setLayout(new FlowLayout(FlowLayout.LEFT));
    pnlAppInput.add(pnlAppLbl);
    pnlAppInput.add(pnlAppTxt);
    //pnlAppInput.setVisible(false);
    //pnlAppTbl
    pnlAppTbl.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createTitledBorder("Tbl :"),
    BorderFactory.createEmptyBorder(5,5,5,5)));
    //pnlAppTbl.setLayout(new BoxLayout(pnlAppTbl,BoxLayout.LINE_AXIS));
    //pnlAppTbl.setLayout(new GridLayout(1,0));
    pnlAppTbl.setLayout(new BorderLayout());
    pnlAppTbl.add(scrollApp);
    //pnlAppTblInput
    pnlAppTblInput.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createTitledBorder("TblInput :"),
    BorderFactory.createEmptyBorder(5,5,5,5)));
    pnlAppTblInput.setLayout(new FlowLayout(FlowLayout.LEFT));
    pnlAppTblInput.add(pnlAppTbl);
    pnlAppTblInput.add(pnlAppInput);
    //pnlApp
    pnlApp.setLayout(new FlowLayout(FlowLayout.LEFT));
    pnlApp.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createTitledBorder("Application :"),
    BorderFactory.createEmptyBorder(5,5,5,5)));
    //pnlApp.add(pnlAppTbl);
    pnlApp.add(pnlAppTblInput);
    //pnlHst
    pnlHst.setLayout(new FlowLayout(FlowLayout.LEFT));
    pnlHst.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createTitledBorder("History :"),
    BorderFactory.createEmptyBorder(5,5,5,5)));
    pnlHst.add(scrollHst);
    //pnlMain
    pnlMain.setLayout(new BoxLayout(pnlMain,BoxLayout.PAGE_AXIS));
    pnlMain.setBorder(BorderFactory.createCompoundBorder(
    null,
    BorderFactory.createEmptyBorder(5,5,5,5)));
    pnlMain.add(pnlHeader);
    pnlMain.add(pnlApp);
    pnlMain.add(pnlHst);
    setSize(1015,712);
    * PaoTableModel.java
    * Created on December 15, 2006, 7:53 AM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package qis_dreamteam;
    import java.text.Format;
    import javax.swing.*;
    import java.net.URL;
    import java.util.Date;
    import java.util.Vector;
    import java.util.Timer;
    import java.util.TimerTask;
    import java.io.*;
    import java.sql.*;
    import java.lang.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.table.AbstractTableModel;
    * @author JPQuilala
    public class PaoTableModel extends AbstractTableModel {
    Vector vData;
    int colCount;
    String[] headers;
    String sSQL;
    public PaoTableModel(String sSQL) {
    DbManager oDB=new DbManager();
    oDB.conQAPROD();
    ResultSet oRS=oDB.execQuery(sSQL);
    vData = new Vector();
    try {
    ResultSetMetaData metaData=oRS.getMetaData();
    colCount = metaData.getColumnCount();
    headers = new String[colCount];
    for (int i = 1; i <= colCount; i++) {
    headers[i - 1] = metaData.getColumnName(i);
    while (oRS.next()) {
    String[] sRecord = new String[colCount];
    for (int i = 0; i < colCount; i++) {
    sRecord[i] = oRS.getString(i + 1);
    vData.addElement(sRecord);
    } catch (SQLException ex) {
    vData = new Vector();
    ex.printStackTrace();
    } finally {
    oDB.disconnect();
    public String getColumnName(int i) {
    return headers[i];
    public int getColumnCount() {
    return colCount;
    public int getRowCount() {
    return vData.size();
    public Object getValueAt(int row, int col) {
    return ((String[]) vData.elementAt(row))[col];
    this is the exact code... my problem is how can i set the JTable's size to be dependent on the JFrame and it should automaticaly adjust size when i inserted another JPanel.

    Sorry, but I didn't read all the code... but if I could understand, the layout managers that you used adjust automatically with the window size. Another thing, it's not the table that you have to adjust. As the tables are in a jscrollpane, it's the size of the scrollpane that you have to adjust.
    If you wan't a tip, try to use background color to visualize the size of your components. Sometimes, the table or another component is already adjusted, but the text or other components in it, it's not.

  • Choosing Layout Manager for a simple swing GUI application.

    I am about to design a swing application with following design. The main Frame will consist of two panels, the left one will hold a tree menu and the right one will display or remove other panels from the main Frame based on the tree menu item selection. I won't be using CardLayout, because when a new menu item is selected from the left tree, I will remove the existing panel from the right side (completely from the swing memmory) and load a fresh panel.
    I have used absolute positioning in the past and can use the same for this design too. But for the advantages of using a LayoutManagers instead, I am willing to use them(Layout Managers).
    I understand that the main Frame could have BorderLayout with the tree menu on the left, the appropriate panels can be positioned at the center.
    For the panels that are loaded on the right side of the Frame, I am not sure about which LayoutManager should be used (hence I am posting this question). The panel will compose of input components (labels, textfields, comboboxes...), properly formatted and buttons. I believe that I can use FlowLayout for positioning the buttons in the bottom of the panel, but I am not sure of which LayoutManager to use for input components.
    regards,
    nirvan.

    I would use a JSplitPane to separate the tree menu from the display panel with the display panel being static and a fixed size(you're won't be removing or replacing) and placing the app. panels that correspond to the selected item in the menu into the "display panel".
    //             //     display          //
    //   tree      //        panel         //
    //   menu      //                      //
    /////////////////////////////////////////

  • What is the optimal layout manager for a task bar

    Hi all, I am programming a task bar like the one used in windows. On first glance, it seems as though FlowLayout would be good, but I need to be able to add new buttons in between existing ones (instead of just appending them to the end). It doesn't seem that BoxLayout or GridLayout support this functionality especially well either. Any suggestions as to what I should use?
    Can I tweak one of the existing Layouts? Do I need to make my own?
    thanks

    Hi,
    you may use FlowLayout. Any layout is not responsible for the order.
    you should use the method :
    public Component add(Component comp, int index);
    to place the component in a right place.
    from class java.awt.Container.

  • Crystal Report Layout asking for Login Info

    I have modified the Delivery Note Crystal Report Layout for Business One by clicking the Edit button on the Report and Layout Manager for Delivery Note (Items).  I then saved my modifications to a file.  Finally, I go into Business One and import the Layout for Delivery Note (Items).  When I preview the Layout it asks me for login information then continues to fail.  How dow I make it so I can print the Delivery without having to constantly log in?

    Hi Jeff,
    I recently had a similar problem on an 8.82 implementation, having contacted and spoken to SAP Support multiple times these suggested fixes worked:
    The request to login to the database when you open or print preview a Crystal
    report is a known issue. To resolve this, I recommend you go through our Root
    Cause Analysis (RCA) guide. Please see attac hed Note 1676353 on where to find
    this. There are four Cases in this guide (which contain a number of Influences)
    - please go through all Cases and Influences.
    We also tried the following:
    STEP 1:
    Influence 2: Case 2 is to clear all the data for login (e.g. sa and
    password - delete them) and then ticked 'Integrated Security#.
    - Influence
    3: #: Check the current datasource is to update connection.
    - Retest opening
    the system reports on a workstation.
    - If they are still reporting an error
    try the next step
    - STEP 2:
    - Change the datasource location of
    the report from OLE DB to SAP Business One type and leave the
    authentication
    information blank. Try running the report in Crystal, and then import to SAP.
    And also opened up the Crystal Report via the Edit button in SAP in Reports and Layouts Manager, we then clicked on the database connection and updated all the tables (even though they were the same) and these got the reports needed working. Speaking to SAP it is a known bug and they are releasing a hotfix to resolve it, but try explaining that to a customer !!!
    Hope these help.
    Regards
    Sean

  • Opinion about MiG Layout Manager

    Hi coders,
    I am rather new to SWING coding.
    I just wanted to know whether using MiG Layout Manager for creating GUI in SWING is preferable or not.
    I had come across some reviews about the same which were good.
    If anyone have used this layout manager, please give your feedback.
    Also if any one have a suggestion to use any layout manager other than MiG (may be default ones), please post that also
    Thank you all.
    Edited by: crispwind on Aug 11, 2008 11:20 PM

    Also if any one have a suggestion to use any layout manager other than MiG (may be default ones)...you seem to have the mis-conception that you can only use a single LayoutManager in an app.
    you need to get to know most of the common ones, their stong (and weak) points, then, using
    this knowledge (and some imagination) nest one or more panels (each a different layoutmanager) to
    get the effect you're after e.g. if the frame is resized, is the component to grow/shrink, is it to move or stay put etc
    [http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]

  • Adding Custom Layout Manager

    I'm trying to add my own LayoutManager to JDeveloper following the instructions at http://otn.oracle.com/jdeveloper/help/
    This might help identify the exact page:
    javascript:top.footer.viewTopic('jar%253Afile%253A/u01/webapps/OHW/ohw-app/jdeveloper/helpsets/jdeveloper/developing_gui_clients.jar%2521/ui_paddcustom.html');
    Snip
    JDeveloper supports the integration of other layout managers with its UI Editor. To get a custom layout manager to appear in the Inspector's layout property list, make sure that the layout manager is on the IDEClasspath as defined in JDeveloper\bin\jdeveloper.ini, and add the following line to JDeveloper\bin\addins.properties:
    jdeveloper.uiassistant.<full class name>=oracle.jdeveloper.uidesigner.BasicLayoutAssistant
    End snip
    I don't have jdeveloper.ini anywhere in my hierarchy. At present, I'm setting JDEV_CLASSPATH before starting jdev.exe. Is their a method for providing my own libraries to JDeveloper?
    I have addins.properties, but it is in JDeveloper\jdev\bin and this is the one I'm editing.
    Adding the line above gives the following console message when the UI is started:
    Assistant for com.wb.wfc.FormLayout could not be found: oracle.jdeveloper.uidesigner.BasicLayoutAssistant
    Adding jdeveloper.uiassistant.com.wb.wfc.FormLayout=oracle.jdevimpl.uieditor.assistant.BasicLayoutAssistant (cribbed from other assistants in the addins.properties file) shows my manager in the PropertyInspector, but won't allow it to be selected.
    My manager takes a simple String as it's Constraint. Must I do something else?
    Tony.

    Hello,
    we would like to provide a Layout Manager Support for a custom layout manager in JDev 9.0.3. A short description of how this can be done is provided in den jdev online docs "Developing Java GUI Clients / Working with Layout Manager / Adding Custom Layout Manager". There the javadocs for the oracle.jdevimpl.uieditor package is referenced. We found the classes needed in jdev.jar, but the jdev-doc.jar does not include the javadocs for this package. Can anyone help us with this?
    Regards
    Stefan Unfortunately the uieditor package has not been included in the javadoc distribution. I do not know of a way for you to
    generate the javadoc yourself without the source files. I have logged a bug to have the javadoc included in future releases.
    bug #2697038

  • Identity Management for UNIX (aka Windows Services for Unix) Adding 2012 DC to a prep'd 2003 domain.

    We have been successfully using Windows Services for Unix on a 2003 domain for passwd and group maps.
    I prep'd the domain to allow a 2012 R2 server to be added and then added the IdMU role/feature on this new 2012R2 DC. Now the passwd map is still OK but the group map now shows full usernames rather than short names.
    i.e. what DID show with "ypcat group" as ...
    "infra-shared::65550:gfer,jhug,shig", now shows as
    "infra-shared::65550:Garry Ferguson,Jason Hughes,Steve Higgins"
    and so is not usable. I have had to revert to local /etc/group files on all our unix machines!!
    Help/comments would be really appreciated!
    Garry Ferguson

    Hi Gaz Ferg,
    SFU 3.5 is used to installed on windows 2003 and windows XP. SFU 3.5 cannot used on Windows 2012, that makes customer cannot user NFS and user name Mapping services on Windows
    2012.  From windows 2003 R2, NFS is a build-in component in OS, we need to add Roles/Features to use NFS.
    1. What is change in 2012R2
    IDMU component, which was used to authenticate Linux users has been removed. Now a Windows server cannot play role of NIS Master server. 
    Passwords cannot sync to the Unix Machines. Maps can not sync between Windows and Unix computers.
    2. What has not change in 2012R2
    Following methods to authenticate and map a Unix user to Window user are available:-
    Active Directory
    Active Directory Lightweight Directory Services (AD LDS)
    Username Mapping Protocol store (MS-UNMP
    Local passwd and group files
    Unmapped UNIX Username Access (UUUA) (applies to Server for NFS using AUTH_SYS only)
    You can find more information about this here –
    http://blogs.technet.com/b/filecab/archive/2012/10/09/nfs-identity-mapping-in-windows-server-2012.aspx
    http://blogs.msdn.com/b/shan/archive/2006/12/13/sfu-sua-idmu-fun-with-names.aspx
    More information:
    Install Identity Management for UNIX Components
    http://technet.microsoft.com/en-us/library/cc731178.aspx
    I’m glad to be of help to you!
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Suitable Page Size for Fixed Layout

    What could be a suitable Page Size for EPUB Fixed Layout? Is there a best practice? Should we take iBook Author's format which is 768 x 1004 pt? Has Google Play Books any suggestions (I didn't found any...).
    Any suggestions?
    Thanks
    Haeme Ulrich

    Not sure whether this link will be helpful or not!
    http://apex.infogridpacific.com/dcp/fxl-pagesize-tutorial.html
    Derek

  • Layout Management in Table Control

    Hi Dialog Programming Experts,
    I have a new requirement - adding Layout Management options in Table Control. This is dialog/module programming, not ALV Report. Is there a function module for this?
    Thanks so much in advance for your help.
    Regards,
    Joyreen

    Hi
    For filter use the following function modules,
    l_rightx-id = l_index.
      l_rightx-fieldname = 'DESCR'.
      l_rightx-text = text-054.
      APPEND l_rightx TO i_rightx.
      l_index = l_index + 1.
      CLEAR l_rightx.
      l_rightx-id = l_index.
      l_rightx-fieldname = 'DEL_CM'.
      l_rightx-text = text-055.
      APPEND l_rightx TO i_rightx.
    CALL FUNCTION 'CEP_DOUBLE_ALV'
           EXPORTING
                i_title_left  = text-034
                i_title_right = text-035
                i_popup_title = text-036
           IMPORTING
                e_cancelled   = l_cancelled
           TABLES
                t_leftx       = i_leftx[]
                t_rightx      = i_rightx[].
    Firstly populate the right table with all fields which you want in the filtering condition. The left table will be populated once the use selects some fields and transfer it to the left portion of the dialog.
    Then use the following FM like this.
    DATA: i_group TYPE lvc_t_sgrp.
          CALL FUNCTION 'LVC_FILTER_DIALOG'
               EXPORTING
                    it_fieldcat   = i_fldcat1
                    it_groups     = i_group
               TABLES
                    it_data       = i_ziteminvoice[]
               CHANGING
                    ct_filter_lvc = i_filter
               EXCEPTIONS
                    no_change     = 1
                    OTHERS        = 2.
    here filter table should have fields from left table above.
    Once you get the filter data, populate range table for each fields and then delete your internal table using these range.
    CASE l_filter-fieldname.
                  WHEN 'ITMNO'.
                    l_itmno-sign = l_filter-sign.
                    l_itmno-option = l_filter-option.
                    l_itmno-low = l_filter-low.
                    l_itmno-high = l_filter-high.
                    APPEND l_itmno TO li_itmno.
                    CLEAR l_itmno.
    DELETE i_ziteminvoice WHERE NOT  itmno IN li_itmno OR
                                          NOT  aedat IN li_aedat OR...
    First check this if it works, else let me know.
    Thanks
    Sourav.

  • WES 7 OSD standalone (works) vs bootable (fails) - Failed to find suitable device driver for device (help)

    Hi everyone,
    I'm trying to deploy a Windows Embedded Standard 7 (trial key at the moment) image in SCCM 2012 SP1 with a very simple task sequence.
    I have a 'build and capture' and an OSD TS. I'm testing these on Hyper-V PCs and both work fine when i create stand alone media. The problem arrises when I try to deploy (or build & capture) with a bootable media;
    The TS starts, formats the disk, applies the OS, Windows and network settings, Apply Device Drivers etc., but when it reboots into Windows
    (or WES7 to be exact) it cant boot. The Windows Boot Manager reports a 0xc0000359 for storvsc.sys
    And I can't figure out what's wrong. I will post the SMSTS log further down below. The SAME TS works fine when it's a stand alone media.
    I have tried to:
    - Apply the WIM manually (nothing wrong - boots fine)
    - Create and apply driver package for the Hyper-V machines (from the MSI's Windows5.x-HyperVIntegrationServices-x86 and Windows5.x-HyperVIntegrationServices-x64)
    - No dice
    - Create a new boot image with the hyper-v drivers in it. No dice
    - Google everything related I can think of.
    I suspect it has something to do with the lines where it says:
    "Failed to find a suitable device driver for device xxx”
    It also has a couple of 401 errors when trying to get the packages, but it seems like it DOES end up getting the content.
    Please help! What could it be?
    I have 2 Hyper-V machines; one w. legacy network adapter - one not. Both have same issue.
    I have 2 Hyper-V machines; one w. legacy network adapter - one not. Both have same issue.
    SMSTS log key points are (the log is too long to post here):
    401 - Authentication failure on request with anonymous access, retrying with context credentials.                     
    OSDDriverClient               
    5/6/2014 4:03:41 PM     612 (0x0264)
    401 - Authentication failure on request with context credentials, retrying with supplied credentials.                     
    OSDDriverClient               
    5/6/2014 4:03:41 PM     612 (0x0264)
    Downloaded file from http://<CUSTOMER DP REMOVED>:80/SMS_DP_SMSPKG$/56D13589-D906-4697-8A1E-1CC3211902AA/sccm?/s3cap.inf to C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA\s3cap.inf   
    OSDDriverClient                  
    5/6/2014 4:03:41 PM         
    612 (0x0264) Downloaded file from http://<CUSTOMER DP REMOVED>:80/SMS_DP_SMSPKG$/56D13589-D906-4697-8A1E-1CC3211902AA/sccm?/vmbusvideo.cat to C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA\vmbusvideo.cat              
    OSDDriverClient                  
    5/6/2014 4:03:41 PM         
    612 (0x0264) Downloaded file from http://<CUSTOMER DP REMOVED>:80/SMS_DP_SMSPKG$/56D13589-D906-4697-8A1E-1CC3211902AA/sccm?/vms3cap.sys to C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA\vms3cap.sys                   
    OSDDriverClient                  
    5/6/2014 4:03:41 PM         
    612 (0x0264) Download done setting progress bar to 100                  
    OSDDriverClient                  
    5/6/2014 4:03:41 PM                     
    612 (0x0264) VerifyContentHash: Hash algorithm is 32780                 
    OSDDriverClient                  
    5/6/2014 4:03:41 PM                     
    612 (0x0264) Failed to open Software\Microsoft\Sms\Mobile Client\Software Distribution registry key. The client should not get checked for RWH OpLock Type          
    OSDDriverClient               
    5/6/2014 4:03:41 PM                     
    612 (0x0264) Failed to open Software\Microsoft\Sms\Mobile Client\Software Distribution registry key. The client should not get checked for RWH OpLock Type          
    OSDDriverClient               
    5/6/2014 4:03:41 PM                     
    612 (0x0264) Failed to open Software\Microsoft\Sms\Mobile Client\Software Distribution registry key. The client should not get checked for RWH OpLock Type          
    OSDDriverClient               
    5/6/2014 4:03:41 PM                     
    612 (0x0264) Installing driver "Microsoft Emulated S3 Device Cap"    
    OSDDriverClient                  
    5/6/2014 4:03:41 PM                     
    612 (0x0264) Adding "C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA" to Windows driver store.            
    OSDDriverClient                  
    5/6/2014 4:03:41 PM         
    612 (0x0264) Setting %SystemRoot% to "C:\WINDOWS"                   
    OSDDriverClient                  
    5/6/2014 4:03:41 PM                     
    612 (0x0264) Getting namespace "Microsoft-Windows-PnpCustomizationsNonWinPE" for architecture "amd64"
    OSDDriverClient                     
    5/6/2014 4:03:41 PM         
    612 (0x0264) Added list item with key value '1'             
    OSDDriverClient                  
    5/6/2014 4:03:41 PM         
    612 (0x0264) Writing configuration information to C:\_SMSTaskSequence\PkgMgrTemp\drivers.xml                   
    OSDDriverClient                     
    5/6/2014 4:03:41 PM         
    612 (0x0264) Successfully saved configuration information to C:\_SMSTaskSequence\PkgMgrTemp\drivers.xml
    OSDDriverClient                     
    5/6/2014 4:03:41 PM         
    612 (0x0264) Setting temporary directory to 'C:\_SMSTaskSequence\PkgMgrTemp'.                     
    OSDDriverClient                     
    5/6/2014 4:03:41 PM         
    612 (0x0264) Calling Package manager to add drivers to the offline driver store.     
    OSDDriverClient                  
    5/6/2014 4:03:41 PM    612 (0x0264)
    Command line for extension .exe is "%1" %*               
    OSDDriverClient                  
    5/6/2014 4:03:41 PM                     
    612 (0x0264) Set command line: "X:\windows\Pkgmgr\dism.exe" /image:"C:" /windir:"WINDOWS" /apply-unattend:"C:\_SMSTaskSequence\PkgMgrTemp\drivers.xml" /logpath:"C:\_SMSTaskSequence\PkgMgrTemp\dism.log"                   
    OSDDriverClient                  
    5/6/2014 4:03:41 PM    612 (0x0264)
    Executing command line: "X:\windows\Pkgmgr\dism.exe" /image:"C:" /windir:"WINDOWS" /apply-unattend:"C:\_SMSTaskSequence\PkgMgrTemp\drivers.xml" /logpath:"C:\_SMSTaskSequence\PkgMgrTemp\dism.log"                   
    OSDDriverClient                  
    5/6/2014 4:03:41 PM    612 (0x0264)
    Process completed with exit code 0        
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) Dism successfully added drivers to the offline driver store.                
    OSDDriverClient                  
    5/6/2014 4:03:45 PM    612 (0x0264)
    Successfully added "C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA" to the Windows driver store.        
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) Successfully installed driver "Microsoft Emulated S3 Device Cap".      
    OSDDriverClient                  
    5/6/2014 4:03:45 PM    612 (0x0264)
    Entering ReleaseSource() for C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA                     
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) reference count 1 for the source C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA before releasing              
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) Released the resolved source C:\_SMSTaskSequence\ContentCache\56D13589-D906-4697-8A1E-1CC3211902AA                   
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) Ranking compatible drivers for VMBUS\{57164F39-9115-4E78-AB55-382F3BD5422D}\{FD149E91-82E0-4A7D-AFA6-2A4166CBD7C0}       
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_0E4046FEF6FF1BC7776A060DF1B19003E0B5640936488E08E61C41D47A8B26C2 (SMS Driver Rank = 0x0000)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_8E607B402D9A9C9A0FBC0881F11231BDA52B4C8851F1BA00F7E8B3D932FC4871 (SMS Driver Rank = 0x0000)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_54E81CFA62FCB88FCA9D60C01594AA5FCEE40F9D5B28F47DE2A7B70C91268F17 (SMS Driver Rank = 0x0000)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) Driver "Hyper-V Heartbeat" has already been installed. 
    OSDDriverClient                  
    5/6/2014 4:03:45 PM                     
    612 (0x0264) Failed to find a suitable device driver for device 'Intel 82443BX Pentium(R) II Processor to PCI Bridge'.                     
    OSDDriverClient               
    5/6/2014 4:03:45 PM    
    612 (0x0264) Failed to find a suitable device driver for device 'Generic Monitor'.                   
    OSDDriverClient                     
    5/6/2014 4:03:45 PM    
    612 (0x0264) Ranking compatible drivers for VMBUS\{A9A0F4E7-5A45-4D96-B827-8A841E8C03E6}\{242FF919-07DB-4180-9C2E-B86CB68C8C55}       
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_0E4046FEF6FF1BC7776A060DF1B19003E0B5640936488E08E61C41D47A8B26C2 (SMS Driver Rank = 0x0001)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_8E607B402D9A9C9A0FBC0881F11231BDA52B4C8851F1BA00F7E8B3D932FC4871 (SMS Driver Rank = 0x0001)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_54E81CFA62FCB88FCA9D60C01594AA5FCEE40F9D5B28F47DE2A7B70C91268F17 (SMS Driver Rank = 0x0001)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) Driver "Hyper-V Heartbeat" has already been installed. 
    OSDDriverClient                  
    5/6/2014 4:03:45 PM                     
    612 (0x0264) Failed to find a suitable device driver for device 'Numeric data processor'.      
    OSDDriverClient                     
    5/6/2014 4:03:45 PM    
    612 (0x0264) Ranking compatible drivers for VMBUS\{35FA2E29-EA23-4236-96AE-3A6EBACBA440}\{2450EE40-33BF-4FBD-892E-9FB06E9214CF}        
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_8E607B402D9A9C9A0FBC0881F11231BDA52B4C8851F1BA00F7E8B3D932FC4871 (SMS Driver Rank = 0x0001)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_54E81CFA62FCB88FCA9D60C01594AA5FCEE40F9D5B28F47DE2A7B70C91268F17 (SMS Driver Rank = 0x0001)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) SCOPEID_4AA3EF76-E8E6-4FC3-8E79-00F39F7D1CB5/DRIVER_C01B80DA1C014302CC793357FF0F1C0486554D11_0E4046FEF6FF1BC7776A060DF1B19003E0B5640936488E08E61C41D47A8B26C2 (SMS Driver Rank = 0x0001)                    
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264) Driver "Hyper-V Heartbeat" has already been installed. 
    OSDDriverClient                  
    5/6/2014 4:03:45 PM                     
    612 (0x0264) Failed to find a suitable device driver for device 'Microsoft System Management BIOS Driver'.                     
    OSDDriverClient               
    5/6/2014 4:03:45 PM    
    612 (0x0264) Failed to find a suitable device driver for device 'CD-ROM Drive'.
    OSDDriverClient               
    5/6/2014 4:03:45 PM  612 (0x0264)
    Exiting with return code 0x00000000      
    OSDDriverClient                  
    5/6/2014 4:03:45 PM         
    612 (0x0264)
    In advance: Sorry...

    Hi,
    0xc0000359 for storvsc.sys
    Looks like Hyper-v Storage Controller driver issue.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Doing without layout manager

    Hi guys.
    I have a very complex problem.
    I've been writing a code that should be able to display a general tree. The tree has to look like an organigram, if you know what I mean. For example, the parent node is a the top and the child nodes are underneath it.
    It's clear that there is no layout manager that can handle this correctly. At least I assume.
    I used the Node Positioning of John Walker to compute the x- and y-coordinate of each node.
    I can display the nodes so far, but I don't know how to force a scrollpane to react to the size of the JPanel containing the nodes.
    In fact, the JPanel containing the nodes of the tree has a null layout manager. If it contains let say 10 nodes, it becomes big enough. However the scrollpane doesn't grow along with the panel.
    What should I do to let the scroll pane grow so that all nodes can be seen.
    Regards.
    Edmond

    It's clear that there is no layout manager that can handle this correctly. Correct. So you need to create a custom layout manager.
    I used the Node Positioning of John Walker to compute the x- and y-coordinate of each node. This is the code that should be added to your custom layout manager.
    but I don't know how to force a scrollpane to react to the size of the JPanel containing the nodes.This is the job of the layout manager. It will determine the preferred size of the panel based on the location/size of all the components added to the panel.
    Here is a simple example to get you started. This layout displays the components diagonally:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class NodeLayout implements LayoutManager, java.io.Serializable
         private int hgap = 20;
         private int vgap = 20;
         public NodeLayout()
          * Adds the specified component with the specified name to the layout.
          * @param name the name of the component
          * @param comp the component to be added
         @Override
         public void addLayoutComponent(String name, Component comp) {}
          * Removes the specified component from the layout.
          * @param comp the component to be removed
         @Override
         public void removeLayoutComponent(Component component)
          *     Determine the minimum size on the Container
          *  @param      target   the container in which to do the layout
          *  @return      the minimum dimensions needed to lay out the
          *                subcomponents of the specified container
         @Override
         public Dimension minimumLayoutSize(Container parent)
              synchronized (parent.getTreeLock())
                   return preferredLayoutSize(parent);
          *     Determine the preferred size on the Container
          *  @param      parent   the container in which to do the layout
          *  @return  the preferred dimensions to lay out the
          *              subcomponents of the specified container
         @Override
         public Dimension preferredLayoutSize(Container parent)
              synchronized (parent.getTreeLock())
                   return getLayoutSize(parent);
          *  The calculation for minimum/preferred size it the same. The only
          *  difference is the need to use the minimum or preferred size of the
          *  component in the calculation.
          *  @param      parent  the container in which to do the layout
         private Dimension getLayoutSize(Container parent)
              int components = parent.getComponentCount();
            int width = (components - 1) * hgap;
            int height = (components - 1) * vgap;
              Component last = parent.getComponent(components - 1);
              Dimension preferred = last.getPreferredSize();
              width += preferred.width;
              height += preferred.height;
              Insets parentInsets = parent.getInsets();
              width += parentInsets.top + parentInsets.right;
              height += parentInsets.top + parentInsets.bottom;
              Dimension d = new Dimension(width, height);
              return d;
          * Lays out the specified container using this layout.
          * @param       target   the container in which to do the layout
         @Override
         public void layoutContainer(Container parent)
         synchronized (parent.getTreeLock())
              Insets parentInsets = parent.getInsets();
              int x = parentInsets.left;
              int y = parentInsets.top;
              //  Set bounds of each component
              for (Component component: parent.getComponents())
                   if (component.isVisible())
                        Dimension d = component.getPreferredSize();
                        component.setBounds(x, y, d.width, d.height);
                        x += hgap;
                        y += vgap;
          * Returns the string representation of this column layout's values.
          * @return      a string representation of this layout
         public String toString()
              return "["
                   + getClass().getName()
                   + "]";
         public static void main( String[] args )
              final JPanel panel = new JPanel( new NodeLayout() );
              panel.setBorder( new MatteBorder(10, 10, 10, 10, Color.YELLOW) );
              createLabel(panel);
              createLabel(panel);
              createLabel(panel);
              createLabel(panel);
              createLabel(panel);
              JButton button = new JButton("Add Another Component");
              button.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        NodeLayout.createLabel( panel );
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.add( new JScrollPane(panel) );
              frame.add(button, BorderLayout.SOUTH);
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible( true );
         public static void createLabel(JPanel panel)
              JLabel label = new JLabel( new Date().toString() );
              label.setOpaque(true);
              label.setBackground( Color.ORANGE );
              panel.add( label );
              panel.revalidate();
              panel.repaint();
    }You would need to customize the getLayoutSize() and layoutContainer() methods to meet your Node Layout requirements.

  • Delete the Folder Defined during Report & Layout manager Process

    Hi everyone,
    I have created a folder within inventory reports during Report & Layout manager Process ,
    while adding a crystal report in SAP.  Now I want to delete that folder. but delete option is only for
    report, not for folder. Please if anyone can help me on this.
    I am working on
    SAP 8.8 PL08
    Thanks
    Annu

    Hi,  all
    I have the same issue  and I can't delete the folder from user authorizations,
    I deleted the report from Layouts  & Reports but the crystal reports .RPT still in the form "User Authorizations"
    I have SAP 8.8 PL 17.
    What can I do???
    Thanks

Maybe you are looking for

  • Can i stream a tv show from a macbook to atv???

    new to apple tv2. wondering if i can stream a tv show from the network website from my macbook to my atv???

  • Latest Value in Report

    Hi, I am creating a report with Client have some numbers for year and month basis. I am showing this in a Cross tab. User want to see the latest value also in a seperate  Column as latest and it should be the last month shown in cross tab. Attached i

  • Specific characters are not displayed

    Hi I'm encountering the following problem: Although I managed to display Greek characters in my wap application some characters are displayed as a square followed by ?.Can you help me.I can't figure out what the problem might be. Thanks in advance.

  • TM on more than one computer

    Hello all, I currently have a desktop iMac, MBPro and MacBook with seperate external hard drive backups. I just received a Seagate 3 TB hard drive, 3.0 USB with a 800 FW adapter. What would be the best recommendation for backing up all data on three

  • Another date question

    Hello, As a beginner to Java I was wondering if someone could assist me. I have a string that I want to convert into a date. String is: 20060209211353Z the date format I would like is: 09/02/2006 (dd/mm/yyyy) I have just been trying to use simpledate