Multiple gui

i have done this in applets by using url but i don't know how to do it in application without resulting to tabbed panes... something like in vb6 where clicking a button will hide the current gui/panel and showing another... each panel are of different class...

How about:
panelA.hide();
panelB.show();

Similar Messages

  • Support of multiple GUI clients

    Hi,
    Currently, we have an application which partially supports multiple
    GUI clients. When a GUI first launches, it will pop up a dialog box
    to select "Read" or "Read/Write" access mode. Once "Read/Write"
    is selected, others can only select "Read" mode until "Read/Write" mode is released. There is a timer to automatically release the mode, if "Read/Write" is holding up for too long.
    Now., we have to fully support multiple clients. The "Read" and "Read/
    Write" modes have to be removed. That means, mutliple clients can
    send update requests at the same time. Does anyone have ideas how
    to support multiple clients? Is there any "models" out there where
    I can based on to support it?
    Thanks,
    Pin

    Mark, we came out with 8.1.7.4.0 precisely for the reasons you have stated. There is no longer a Windows NT Oracle Service For MTS per database. The logic to enlist Oracle connections in MTS transactions, and the logic to subsequently commit/abort these transactions is fully contained within the middle-tier dlls i.e. ORAMTS.DLL. This removes the single point-of-failure in pre 8.1.7.4.0 versions, and also makes the solution more scalable.

  • Can I make a class holding multiple GUI components and make it visible?

    I am implementing an MDI where the different JInternalFrames are filled with a JPanel with components. Since the contents of my screen is dynamically generated, each screen can have multiple Jlabels, JTextFields, etc.
    So I thought, I make a class containing the representation of one row of GUI components on my screen, which is: one JLAbel and 4 JTextFields.
    Here is the code which adds the components to the panel:
    // create panel
    JPanel qpanel = new JPanel();
    qpanel.setLayout(new BoxLayout(qpanel, BoxLayout.Y_AXIS));
    qpanel.add(Box.createVerticalStrut(5));
    //add rows to panel
    for( int i = 0; i < nrRows; i++)
    // qpanel.add(new JLabel("Hello how are you"));
    qpanel.add(new ProcessRow("hello","how","are","you"));
    // add panel to scrollpanel
    this.getViewport().add(qpanel);
    Here is the ProcessRow class:
    public class ProcessRow extends JComponent
    public JLabel rowLabel = null;
    public JTextField myCost = null;
    public JTextField saratogaCost = null;
    public JTextField sapCost = null;
    public JTextField totalCost = null;
    public ProcessRow() {
    super();
    public ProcessRow(String LABEL,
    String DEFAULTCOST,
    String SARATOGACOST,
    String SAPCOST){
    super();
    JLabel rowLabel = new JLabel(LABEL);
    JTextField myCost = new JTextField(DEFAULTCOST, 6);
    JTextField saratogaCost = new JTextField(SARATOGACOST, 6);
    JTextField sapCost = new JTextField(SAPCOST, 6);
    JTextField totalCost = new JTextField(6);
    If I add the label "Hello how are you" directly to the panel, it shows fine but if I use my ProcessRow class, nothing shows.
    How can I make it visible and if not,
    how can I dynamically keep adding all these GUI components without loosing control over the components.
    Thanks,
    Johnny

    Modify your ProcessRow:
    (1) First extends JPanel ( Container, not Component)
    (2) Add Label and TextField to the container
    public class ProcessRow extends JPanel
    public JLabel rowLabel = null;
    public JTextField myCost = null;
    public JTextField saratogaCost = null;
    public JTextField sapCost = null;
    public JTextField totalCost = null;
    public ProcessRow() {
    super();
    public ProcessRow(String LABEL,
    String DEFAULTCOST,
    String SARATOGACOST,
    String SAPCOST){
    super();
    JLabel rowLabel = new JLabel(LABEL);
    JTextField myCost = new JTextField(DEFAULTCOST, 6);
    JTextField saratogaCost = new JTextField(SARATOGACOST, 6);
    JTextField sapCost = new JTextField(SAPCOST, 6);
    JTextField totalCost = new JTextField(6);
    // add everything to the container.
    add(rowLabel);
    add(myCost);
    add(sapCost);
    add(totalCost);
    }

  • Excel upload FM that works in multiple GUI versions

    Hello all,
    I am looking for some standard SAP functionality that has been released for customer use to upload Excel files into SAP.  We have been using the following two function modules for a number of years successfully.  Now the data is not uploaded correctly into the internal table with GUI 620 patch level 65.
    ALSM_EXCEL_TO_INTERNAL_TABLE
    KCD_EXCEL_OLE_TO_INT_CONVERT
    SAP's response was that these are not officially supported and they would be happy to charge a consulting fee to help us find a solution.
    The following function module works successfully in all the different patch levels of GUI 620 and GUI 640 that I have tried.  However this function module has not been officially released for customer use either.  Meaning at any point in the future this function module could break as well.
    TEXT_CONVERT_XLS_TO_SAP
    The Excel file that we are using contains a macro.  I get very strange results when I try to upload the file using GUI_upload.  The characteristics and the parameters of the macro are being intermingled with the actual data in the Excel file. 
    Is anyone aware of a function module or method of a class, that has been released for customer use, that works successfully in all patch levels of both GUI 620 and 640? We are using SAP version 4.7.
    Thanks
    Bruce
    P.S.  This is the code I'm using successfully using in different patch levels of GUI 620 and 640.
    type-pools: truxs.
    parameters: p_input type  rlgrap-filename  memory id pid_01
                     default 'S:\Bruce\ZFAPI007_files\Perm_vendor_test.xls'.
    types: begin of t_datatab,
               date(10),                             "10-doc date-any format
               account like bkpf-xblnr,                   "16-account number
               name like lfa1-name1,                          "35-legal name
               address like lfa1-stras,                         "35-address
               text42 like lfa1-stras,             "35->>field is not used<<
               city like lfa1-ort01,                            "35-city
               state like lfa1-regio,                           "5-state
               zip like lfa1-pstlz,                             "10-zip
               amount(16),                        "example, "123,456,789.99"
               blart like bkpf-blart,                       "2-document type
               bukrs like bkpf-bukrs,                           "4-company
               lifnr like lfa1-lifnr,                           "10-vendor
               aufnr like bseg-aufnr,                   "12-internal order #
               gsber like bseg-gsber,                       "4-business area
               sgtxt like bseg-sgtxt,                     "50-line item text
               saknr like bseg-saknr,                          "10-GL acct #
               zuonr like bseg-zuonr,                  "18-Allocation Number
               kostl like bseg-kostl,                        "10-Cost Center
               newbk like rf05a-newbk,          " 4 New company     BCT008
          end of t_datatab.
    data: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    data: it_raw type truxs_t_text_data.
    start-of-selection.
    Upload the file, converting to the format of the internal table
      call function 'TEXT_CONVERT_XLS_TO_SAP'
        exporting
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_input
        tables
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       exceptions
          conversion_failed        = 1
          others                   = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      loop at it_datatab into wa_datatab.
        write:/ wa_datatab-date,
                wa_datatab-account,
                wa_datatab-blart.
      endloop.
    end-of-selection.

    April,
    Thanks for your reply.  HR_PK_EXCEL_TO_INTERNAL_TABLE does not show up in our system when doing a search on function modules.  It is good to know that TEXT_CONVERT_XLS_TO_SAP has been released for customer use in newer systems than we are currently using.
    I think that I'll use this function module, TEXT_CONVERT_XLS_TO_SAP, and call it a day. 
    Although, I am still interested in other solutions if anybody out there has one.
    Bruce
    Message was edited by: Bruce Tjosvold

  • Multipanel and/or Multiple GUI DLL

    Hello,
    I am in the process of writing an application that will use some CVI GUI DLL's   The thought is each DLL is associated with an instrument and will have an instrument specific user interface that can be accessed through an exported function (RUNUI).   The inital problem I ran into was that each RUNUI function would call RunUserInterface() and each DLL had a callback with a QuitUserInterface() which resulted in strange behavoir ( the calling application was also written in CVI)  After searching the forums i realized that I should be running each DLL's user interfaces in seperate threads each with it's own RunUserInterface() and QuitUserInterface() so i had modified my code according to what I thought would be the correct solution:
    Each DLL has the following three functions along with some exported functions like init read and close and other associted callbacks for the GUI:
    int __stdcall Photo1980A_RunUI (void)
         int threadFunctionId1 = 0;
        CmtScheduleThreadPoolFunction (DEFAULT_THREAD_POOL_HANDLE, ThreadFunctionPhoto, NULL,  &threadFunctionId1);
        CmtWaitForThreadPoolFunctionCompletion (DEFAULT_THREAD_POOL_HANDLE, threadFunctionId1, OPT_TP_PROCESS_EVENTS_WHILE_WAITING);
        CmtReleaseThreadPoolFunctionID (DEFAULT_THREAD_POOL_HANDLE, threadFunctionId1);
            return 1;  
    static int CVICALLBACK ThreadFunctionPhoto (void *functionData)
        int DLLpanel;
        if ((DLLpanel = LoadPanelEx (0, "1980APhotomGUI.uir", PANEL1980A, __CVIUserHInst)) < 0) return 0;
        SetPanelPos (DLLpanel, 200, 200);
        DisplayPanel (DLLpanel);
        SetSleepPolicy (VAL_SLEEP_MORE);
        RunUserInterface ();
         /* Free resources for the UI and return success */
        DiscardPanel (DLLpanel);
        return 1;
    int CVICALLBACK quitCB (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
        switch (event)
            case EVENT_COMMIT:
                HidePanel (panel);
                QuitUserInterface (0);
                break;
        return 0;
    My Main application has two buttons (one for each of the two DLL's) and pressing a button calls associated RUNUI function.
    So the application works fine as long as I don't try and have two DLL GUI's up at the same time. (open one and as long as it gets closed before calling the other no problems, all the callbacks work etc.)
    As soon as I try and call the second RUNUI function from the main application it partially displays the panel and then goes off in the weeds and I have to abort everything. It seems to hang in the DisplayPanel() function (ie never get's to the RunUserInterface() when i'm single stepping).   So my question is if I'm approaching this the wrong way?
    Other info CVI2010 Windows7 64bit
    Another item is that I have seen the Multipanel example but when I try and run it I get similar behavor (ie when I select the Schedule Function button the panel pops but everything seems to lockup and I dont' see the start button ever fully display)
    Any help would be much appreciated.
    Regards,

    Thanks for the response.  I didn't include my code for the process attach and dettach but it looks very similar (right out of the example).
    int __stdcall DllMain (HINSTANCE hinstDLL, DWORD fdwReason,
                           LPVOID lpvReserved)
        if (fdwReason == DLL_PROCESS_ATTACH)
             /* Place any initialization which needs to be done when the DLL */
            /* is loaded here. */
            if (InitCVIRTE (hinstDLL, 0, 0) == 0)
                return 0;
        else if (fdwReason == DLL_PROCESS_DETACH)
            /* Place any clean-up which needs to be done when the DLL */
            /* is unloaded here. */
            if (!CVIRTEHasBeenDetached ())
                CloseCVIRTE (); 
        /* Return 0 to abort if initialization fails */
        return 1;
    How does your DLL handle GUI callbacks and process events if you aren't running the RunUserInterface?  If you call this from something other than a CVI application does it still work?
    Regards,

  • Flyweight Pattern use with multiple GUI components

    Hi,
    I am creating a simple application and I would like your advice on wether I should use the flyweight pattern or not.
    My application is essentially a GUI front to a repository of small images. The GUI (in its simplest form) is a single window that will display all the images with their names in a clickable thumbnail format. The user will be able to select an thumbnail icon, drag it and move it around pretty much like the icons on your computer desktop.
    The easiest way to do that is probably to load each image and its name into a JLabel, add it in a JFrame and write just few lines of code (say by extending the JLabel class) to handle mouse pressed/dragged events in order to move the label around. The rest will be taken care of by the swing functinality (e.g. painting etc).
    However, I am considering using the flyweight pattern for efficiency but I am not sure if it is appropriate. So far I have seen simplistic examples of its use (apart from JTree) where the pattern is used to paint dozens of lines on the screen or the borders of components. But what happens if instead of lines or borders the objects in question are interactive GUI components such as my thumbnails? how does the flyweight pattern work in this case?
    For example if I create just a single JLabel and use it to paint all my icons that's great! but what happens with mouse events? what happens when I want to drag a thumbnail over another one and how the partial repainting of the thumbnail below should be handled?
    Am I missing something here, or in order to implement the flyiweight pattern in this case I will have to write endless lines of code to replicate the functionality that swing arleady provides in each JComponent? (e.g. targetting of mouse events, repainting etc)
    Cheers,
    Kyri

    I don't think Flyweight applies, because you really don't want to share any UI component that generates events unless the response is the same for all of them.
    If you read Flyweight, I think it was intended for things like caching the first 128 Integers, etc. - think finite, countable, immutable things. I don't think UI elements apply.
    %

  • Multiple GUI's in One Program

    Hi, I am building some Java GUI's and I have a query/problem. I have set the windowClosing(WindowEvent e) method to hide frames (when the x button is clicked) rather than close them ...
    public void windowClosing(WindowEvent e)
    { setVisible(false); }
    I then have a statement in my main class to say that if all windows have been hidden(thought to be closed),then when the last one is closed, exit the program.
    So for example with 2 frames, i have a statement
    if(observable.setVisible(false) && obs1.setVisible(false))
    { System.exit(0); }
    where observeable and obs1 are the frames. for this I get an error "'void' type not allowed here if(observable.setVisible(true) != true"
    So my question is, should I be doing this a different way or what am I doing wrong.
    The Reason that I am trying to do it this is that I am using Inheritance for some of the Frames so I guess that they are not all independant of one another, therefore if I close one of them, they all close and the program exits.
    Any help gratefully appreciated.

    As the previous post says, you shuld replace setVisible with isVisible in your code: if(observable.setVisible(false) && obs1.setVisible(false))
    setVisible is a method that returns "void" or said in other way, does not have return.
    That's why you get the error "'void' type not allowed here", because the method setVisible constitutes an expression of tipe "void", and this is not allowed in an 'if' statement, only boolean expressions.

  • Updating multiple GUI classes

    Hi,
    I'm wondering how it would be possible to have a class (class1) used for information, then two new classes (class2, class3) both used to display the same information from class1 in two seperate ways.
    So far I've put a variable in class2 and again in class3 that can be initialised to class1 at construction, so then all I do is just use class1's get() methods to get the information to display in class2 and class3.
    The problem is, I'm not sure how to make class2 and class3 update themselves every time the information in class1 changes.

    The GUI classes should register with the data class as change listeners. You'd typically create your own subclass of EventListener and EventObject. Add addXXXListner(), removeXXXListener and fireXXXListener methods to the data object. When the data changes the data objects first all the registered listeners, which can then query the new data in the normal way.

  • Managing multiple GUI's

    I have several classes that extend JFrame which were built using the netbeans GUI builder. How do I go about linking them together whilst retaining information?
    For example, I have an "Main Menu" GUI which has buttons on it. One of the buttons is "Create Database" which brings up a new GUI that allows information to be entered and the option to go back to the menu.
    What is the best way to link the GUI's together whilst still being able to pass information between them.
    Thanks

    In that case, I would simply call a method in the Controller that takes 5 params, the question, and 4 answers. Let the Controller worry about how to create the Question object. That way, the connection between the View and Controller is defined by functionality (creating a question with 4 answers) instead of an implementation (what if the Question class changes, you'd have to modify the gui and controller instead of just the controller if the gui knew about the Question class). If you keep the View's fingers out of the back-end details, that's less work later when the back-end changes. The same applies the other way for the Model. If the Model simply stores Questions, without being aware of the implementation details of that class, then the only part left that has to know about it is the Controller, which is the brains of the operation.
    I have a hobby project I'm working on that I plan on creating a gui and a command line ui for. They will both implement a View interface, which defines how they interact with the Controller. The Controller won't care how the View is implemented, as long as it get's the data from it that it needs. The View won't care what the Controller does with that data after it passes it off.
    It kills me that so many intro level programming courses start off by teaching hello world in a gui. The student's projects end up being one massive main method with i/o, guis, program logic, etc. all mixed in together. I remember my intro java classes, I barely understood the basics of the language before they started confusing me with swing. Ugh.
    Maybe I should just get a blog...

  • How do I use multiple classes to access the same object?

    This should be staightforward. I have and object and I have multiple GUIs which operate on the same object. Do all the classes creating the GUIs need to be inner classes of the data class? I hope this question makes sense.
    Thanks,
    Mike

    public final class SingletonClass {
    private static SingletonClass instance;
    private int lastIndex = 10;
    public final static SingletonClass getInstance()
    if (instance == null) instance = new SingletoClass();
    return instance;
    public int getLastIndex() {
    return lastIndex;
    }1) This won't work since one could create a new SingletonClass. You need to add a private constructor. Also, because the constructor is private the class doesn't have to be final.
    2) Your design isn't thread-safe. You need to synchronize the access to the shared variable instance.
    public class SingletonClass {
        private static SingletonClass instance;
        private static Object mutex = new Object( );
        private int lastIndex = 10;
        private SingletonClass() { }
        public static SingletonClass getInstance() {
            synchronized (mutex) {
                if (instance == null) {
                    instance = new SingletonClass();
            return instance;
        public int getLastIndex() {
            return lastIndex;
    }if you are going to create an instance of SingletonClass anyway then I suggest you do it when the class is loaded. This way you don't need synchronization.
    public class SingletonClass {
        private static SingletonClass instance=new SingletonClass();
        private int lastIndex = 10;
        private SingletonClass() { }
        public static SingletonClass getInstance() {
            return instance;
        public int getLastIndex() {
            return lastIndex;
    }If you don't really need an object, then you could just make getLastIndex() and lastIndex static and not use the singleton pattern at all.
    public class SingletonClass {
        private static int lastIndex = 10;
        private SingletonClass() { }
        public static int getLastIndex() {
            return lastIndex;
    }- Marcus

  • GUI Screen(JFrame) question

    Hi, I'm not sure if this is ok but I asked a J2SE question about moving from one screen to the next. I have another question; if the screens are dependent on each other i.e. data on one screen has to be displayed and triggers events on the next screen. How do I pass the data from screen to screen and after completing updates on the second screen, make the first screen visible from the second i.e. move back to the first screen?
    Can I keep the screens visible but get focus on only one? So that the other visible screens cannot be modified.

    Im not sure you exactly what your trying to do here, referring to your previous post. In most cases you will only want a single JFrame and muiple panels for various display, however essentially the concept is the same in either case. Youll have a single data model, multiple views.. You should provide methods to handle transitions of data from model to view/ view to model etc...
    When a panel or frame is shown youll typically update that gui with the current data. when a panel or frame is closed youll again most likely want to update the data from the view being closed. You can do this in event handlers. When multiple guis are open, that access the same data, youll have a bit of an interesting problem...
    A good solution is Observer/Observable.
    Where a change in data is observed by guis and guis automatically update......
    Hope this helps/

  • Making middle teir accessible to all gui class objects.

    I'm designing a user interface at the moment for a
    3 tier application. I've got a good knowledge of Java
    but have never written a complicated gui with Swing.....
    User Interface (GUI) --> Business Logic (JDBC classes) --> MYSQL DB
    As the diagram shows, I want to keep the business logic separate
    from the user interface.
    My problem is that I'm not sure the best way to give all the GUI's action listeners
    access to the business logic object's methods which will call and return information
    from the database to the UI.
    Had there just been one UI class it would be easy to create an instance of the
    business logic class from the UI class, but
    the GUI is made up of many class objects with larger componets being made
    up of several smaller component classes and so on. What I guess I'm unsure of
    is what the standard practice is in this situation. Is a case of getting the GUI creation class
    to create an instance of the business logic object and then pass it down through the many
    GUI class constructors so that each GUI class object can reference it?
    You thoughts are appreciated, many thanks,
    Andrew.

    The commom practice here is to use some design patterns.
    The ones you need are Proxy and DTO (Data Transfer Object).
    The reasons behind using a proxy patters are that your DB could
    change location, and you could have multiple GUI's using the
    same DB
    You will have several DTO's which will contain the data from your
    database. These DTO's are used to group data common to one use
    case, so that in order to complete the use case, you only need to
    remotely access the DB once. These Dto's are regular Java objects
    with just getter and setter methods.
    Your GUI uses a Proxy object to request a DTO.
    someting like... you need some data to fill a form or a table?
    GUIProxy proxy = ProxyServices.getGUIProxy();
    FormDataDto dto = proxy.getFormData();
    JTexField nameField = new JTextField();
    nameField.setText(dto.getCustomerName());
    etc...
    Notice how your GUI has no idea where the data lives,
    how its stored, etc. It just knows how to request it.

  • GUI Positioning

    I'm writing a Gui Program and need to know how i can "stack the components". I need 2 text fields on the top, below them i need two text areas, and between the text area's I need to have a button, a text field, another button and another Text field aligned vertically. Here's the code so far..you'll get the jist. Any ideas would be great. Thanks, wes.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.UIManager;
    import java.awt.*;
    import java.io.*;
    import java.text.*;
    class ButtonPanel extends JPanel
         public ButtonPanel()
              setLayout(new BorderLayout());
              JPanel p1 = new JPanel();
              p1.setLayout(new FlowLayout(FlowLayout.LEFT));
                      JLabel l1 = new JLabel("Enter Item# or Key Word");
                      p1.add(l1);
                      searchTF = new JTextField("", 10);
              p1.add(searchTF);
                      JButton findButton = new JButton("Search");
              p1.add(findButton);
                      JLabel l2 = new JLabel("                        Additional Info");
              p1.add(l2);
              JTextField additionalTF = new JTextField("", 10);
              p1.add(additionalTF);
                      JLabel l3 = new JLabel("Search Results");
              p1.add(l3);
              resultsTA = new JTextArea(25, 20);
              scrollPaneResults = new JScrollPane(resultsTA);
              resultsTA.setLineWrap(false);
              resultsTA.setWrapStyleWord(false);
              p1.add(scrollPaneResults);
                      addButton = new JButton("Add >>");
              p1.add(addButton);
              JLabel l4 = new JLabel("Qty:");
              p1.add(l4);
              qtyTF = new JTextField("", 4);
              p1.add(qtyTF);
              removeButton = new JButton("<< Remove");
              p1.add(removeButton);
              JLabel l5 = new JLabel("Qty:");
              p1.add(l5);
              qtyrTF = new JTextField("", 4);
              p1.add(qtyrTF);
              JLabel l6 = new JLabel("Order");
              p1.add(l6);
              orderTA = new JTextArea(25, 20);
              scrollPaneOrder = new JScrollPane(orderTA);
              orderTA.setLineWrap(false);
              orderTA.setWrapStyleWord(false);
              p1.add(scrollPaneOrder);
              add(p1);
         private JButton addButton;
         private JButton removeButton;
         private JButton circleButton;
         private JScrollPane scrollPaneResults;
         private JTextField searchTF;
         private JTextArea resultsTA;
         private JTextField additionalTF;
         private JTextField qtyTF;
         private JTextField qtyrTF;
         private JTextArea orderTA;
         private JScrollPane scrollPaneOrder;
         static public char buttonType;
    class ButtonFrame extends JFrame
         public ButtonFrame()
              setTitle("Multiple GUI Component Test");
              setSize(700, 500);
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        System.exit(0);
             Container contentPane = getContentPane();
             contentPane.add(new ButtonPanel());
    public class WesUi
         public static void main(String[] args)
              JFrame frame = new ButtonFrame();
              frame.show();
    }

    Here's the tutorial on laout in Swing. There should be some good ideas in there:
    http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html
    Also, I use the class Box a lot. You can create horzontal or vertical boxes and put as much space as you want inbetween components using struts, or have use glue if you want more of a variable amount of space.
    So, you can say make 3 vertical boxes, one with the text field and area on the left, one for the two buttons in the middle and one for the text field and area on the right. Add struts to space them where ever you want and then use the Layout management to place them in the frame.
    Here's a quick version of using Boxes (it can be confusing):
    Box buttonBox = Box.createVerticalBox();
    buttonBox.add(Box.createVerticalStrut(50));
    buttonBox.add(addButton);
    buttonBox.add(Box.createVerticalStrut(10));
    buttonBox.add(removeButton);
    buttonBox.add(Box.createVerticalStrut(50));That will give you vertially stacked buttons with 50 pixels on the top and bottom of them and 10 pixels inbetween them.
    Hopefully this will get you started.

  • Backup user account with command line

    I am trying to set up a command line script (bash alias, actually) that will let me backup my entire user account to an externa firewire. Right now I am using
    rsync -a -u --delete --stats /Users/me /Volumes/FW_Backup/me/
    but I get about 500 meg less data at the destination as I have at the source and I get a command line response saying that some files could not be copies for permissions reasons.
    Would it fix things to run this command under Sudo or is there a better way to be sure I have a complete clone of my user account syncronized whenever the command is run (I am aware that there are multiple GUI resolutions to this but prefer to use the free native tools so I can roll it out to multiple Macs).

    I did try that but if I recall properly you wind up with other permissions problems - in the case of root not having permissions to the user. So I simply excluded the troublesome paths:
    code
    rsync -a -u --exclude Library/Caches/ --exclude Library/Preferences/ --delete --stats /Users/Richard /Volumes/rich_backup/
    And that has worked, but now I have a new problem: if the network share is not mounted, rsync will simply create the directory /volumes/rich_backup on the hard disk and rsync to it! This is a obviously a problem should I or other users forget to mount the network share intended for backup. So I need to figure out how to get the command to error out if the network share is not present. I tried to begin the script with
    code
    ls /volumes/rich_backup &&
    in order to get it to error out if the share was not present and it worked on my Tiger system, but on a customer's Panther system the script does not error out! Can anyone help me with some code that will intentially break my backup script if the destination volume is nor present?
    Dual 2.7 PowerMac Mac OS X (10.4.2)

  • Concurrent user logins using same user ID- Is it Possible?

    Hi Experts,
    I want to know how can I make the configuration for user ID in SAP to login in to the system at once through different machings. Basically concurrent user logins using same user ID.
    Is this is possible?  whats the configuaration? Am I violating any SAP license policies?
    Please help me with this.

    just for the knowledge, it is possible and via following parameter
    login/disable_multi_gui_login
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/41c43ac23cef2fe10000000a114084/content.htm
    However, it is not permitted to use in Production at all. But sometimes, only in critical situations, for eg. we have only a few basis IDs and some maintenance task is to be carried out involving more resources, multiple gui login can be utilized in sandbox to for that ID.
    But, it is for sure that, USMM report will be sent to SAP for the sandbox too. So client is subjectable. If you, as a basis guy, are going to try it, then please do it only after the confirmation from the client and only if client needs it.

Maybe you are looking for