JTabbedPane behaviour

hello everyone,
I'm facing some issues with tab selection in JTabbedPane.
For example i have tabbed pane with 4 tabs. The second and third tab's contains data entry panels. I have overrode 'setVisible' method of JPanel class to ask user if he wants to save entered data or no if this data is not submitted to database.
When i enter data in second tab and try to select third or fourth tab (tab with index greater than tab which is now visible) without submitting data i have situation like this:
1) second tab is showing at the background; (good)
2) JDialog "do you want to save entered data" is showing over. (good)
In this case it all works like i want.
When i enter data in second tab (or third) and try to select first tab (tab with index less than tab witch is now visible) without submitting data i have situation like this:
1) FIRST tab is showing at the background; (!!! WRONG !!!, should be second)
2) JDialog "do you want to save entered data" is showing over. (good)
As i understand, when i select some tab, JTabbedPane iterates through Vector of all tab's from the begining and sets attributes (is it visble or not). Am i wrong? If it's true, how can i manage to work it right: first of all we hide old tab and only after this we show new tab?
Thanx for your suggestions! :)

Demo: selection can only go higher, or back to 0:
import java.awt.event.*;
import javax.swing.*;
public class TabbedPaneExample {
     public static void main(String[] args) {
          JTabbedPane pane = new JTabbedPane();
          for(int i=0; i<10; ++i)
               pane.addTab("tab #"+i, null);
          SingleSelectionModel model = new DefaultSingleSelectionModel() {
               public void setSelectedIndex(int index) {
                    if (index == 0 || index > getSelectedIndex())
                         super.setSelectedIndex(index);
          pane.setModel(model);
          JFrame f = new JFrame("TabbedPaneExample");
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          f.getContentPane().add(pane);
          f.setSize(400,100);
          f.setLocationRelativeTo(null);
          f.setVisible(true);
}

Similar Messages

  • Most Bizarre JTabbedPane behaviour. Help Required!!!

    Folks
    I am getting a Bizarre behaviour regarding JTabbedPane.
    Here it is:
    I am using the addTab() method in my Main class:
    tabbedPane.addTab("One",
    null,
    new SCSCF(),
    "Testing One");
    Nothing is displayed on my Window!!!!!
    But when I say:
    tabbedPane.addTab("One",
    null,
    new SCSCF().show(),
    "Testing One");
    the concerned class details is displayed.
    public class SCSCF {
    public SCSCF(){
    new ScscfGui("Test");
    public Component show(){
    return new ScscfGui("Test");
    Can some please explain this as this is Urgent!!!
    I would like to use the first Option of calling the class directly!!!!!
    ie addTab(...
    new SCSCF(),
    Please can some one help!! Has any one understood my question!!!!

    Now what component is ur SCSCF() class?? Is it a JPanel or what?? Posting some code should help, perhaps...

  • Strange JTabbedPane behaviour

    In my application I need tabs only, i.e., without the content area. I'm trying to achieve that by adding JComponent with (1,1) dimensions. But the more tabs I add the bigger the size of JTabbedPane becomes. Is it a bug?
    Here is a simple testcase:
    package tabtest;
    import java.awt.Dimension;
    import javax.swing.JComponent;
    public class NewJFrame extends javax.swing.JFrame {
        public NewJFrame() {
            jSplitPane1 = new javax.swing.JSplitPane();
            jPanel1 = new javax.swing.JPanel();
            jPanel2 = new javax.swing.JPanel();
            jLabel2 = new javax.swing.JLabel();
            jTabbedPane1 = new javax.swing.JTabbedPane();
            jButton1 = new javax.swing.JButton();
            jButton1.setPreferredSize(new Dimension(100,50));
            jPanel1.setPreferredSize(new Dimension(500, 200));
            this.setSize(800,600);
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
            jPanel1.setLayout(new java.awt.BorderLayout());
            jLabel2.setText("jLabel2");
            jPanel2.add(jLabel2);
            jPanel1.add(jPanel2, java.awt.BorderLayout.CENTER);
            jPanel1.add(jTabbedPane1, java.awt.BorderLayout.NORTH);
            jSplitPane1.setLeftComponent(jPanel1);
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jSplitPane1.setRightComponent(jButton1);
            getContentPane().add(jSplitPane1, java.awt.BorderLayout.NORTH);
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            TestComponent tc=new TestComponent();
            tc.setSize(1,1);
            tc.setPreferredSize(new Dimension(1,1));
            jTabbedPane1.addTab("Tab "+Integer.toString(jTabbedPane1.getComponentCount()),null,tc, "Tab "+Integer.toString(jTabbedPane1.getComponentCount()));
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        private javax.swing.JButton jButton1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        private javax.swing.JSplitPane jSplitPane1;
        private javax.swing.JTabbedPane jTabbedPane1;
    /** JComponent class to be used with JTabbedPane
    class TestComponent extends JComponent{
    }It adds a new tab each time the button is clicked, and with each click it moves jLabel2 down. You may test it to see how the size of JTabbedPane grow.
    Does anyone have ideas why it behaves so? Is there any other way to get tabs without content area?

    Indeed. Most obvious solution, but I've forgot about that. Thanks, that resolved the issue.
    Still, I'm curious why the JTabbedPane keeps growing? As far as I understand the size of JTabbedPane equals the size of the biggest component, isn't it?

  • Strange Behaviour of JTabbedPane.Please Guide

    Folks
    I am getting a strange Error regarding JTabbedPane.
    In my main class,I am using :
    addTab
    ("One",
    null,
    new A(),
    "Test One");
    nothing happens.The contents of class A is not displayed.
    But when I say:
    addTab
    ("One",
    null,
    new A().call(),
    "Test One");
    the contents of Class A() is displayed..
    Why cant i use new A() DIRECTLY....
    Any idea on this?
    Class A(){
    // This does not work
    A(){
    new B();
    // This works..
    public void call(){
    return new B();
    Even in the constructor of A when I say 'return new B()'..this doesnt work
    Any one experienced this..

    Instantiating (making a new) B in the constructor of A is okay. But the new B must be added to the content pane of A for it to be displayed in A.
    import java.awt.*;
    import javax.swing.*;
    public class bhuru extends JFrame {
      public bhuru() {
        JTabbedPane tabbedPane = new JTabbedPane();
        tabbedPane.addTab("One", null, new A(), "new A()");
        tabbedPane.addTab("Two", null, new A().getB(), "new A().getB()");
        tabbedPane.addTab("Three", null, new B(), "new B()");
        tabbedPane.addTab("Four", null, new C(), "new C()");
        getContentPane().add(tabbedPane);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(400,300);
        setLocationRelativeTo(null);
        setVisible(true);
      public static void main(String[] args) {
        new bhuru();
    class A extends JPanel {
      public A() {
        new B();
      // void return type won't work here
      // you are returning an object of type B
      public B getB() {
        return new B();
    class B extends JPanel {
      public B() {
        setPreferredSize(new Dimension(250,175));
        setBackground(Color.red);
    class C extends JPanel {
      public C() {
        add(new B());
        setBackground(Color.blue);
    }

  • Strange behaviour with JTabbedPane

    Hi all,
    I'm making an application where I need to use a JTabbed pane. My problem is that I need to include a heavyweight AWT component on one of my tabs, and what's happening is this heavyweight component is appearing 'on top' of the JTabbedPane. This i could understand because it's a heavyweight component, but something weird happens when I switch tabs...
    If I click on Tab2 (where the heavwight component is displayed), and then click back on Tab1 then it no longer appears 'on top' of the jtabbedpane. Does anyone know what's going on, and even better, how I might fix this?
    Many thanks,
    BBB
    Here's an exmaple of whats happening (notice Button4 is an AWT button):
    import javax.swing.*;
    import java.awt.*;
    public class SimpleTab  extends JFrame{
        public SimpleTab()
            JButton oButton1 = new JButton("Button 1");
            JButton oButton2 = new JButton("Button 2");
            JButton oButton3 = new JButton("Button 3");
            Button oButton4 = new Button("Button 4");
            JPanel oPanel1 = new JPanel();
            JPanel oPanel2 = new JPanel();
            oPanel1.add( oButton1, BorderLayout.NORTH );
            oPanel1.add( oButton2, BorderLayout.SOUTH );
            oPanel2.add( oButton3, BorderLayout.EAST );
            oPanel2.add( oButton4, BorderLayout.WEST );
            JTabbedPane oTabbedPane = new JTabbedPane();
            oTabbedPane.add( oPanel1, "Tab1" );
            oTabbedPane.add( oPanel2, "Tab2" );
            this.getContentPane().add( oTabbedPane );
        public static void main ( String [] args )
            SimpleTab oTabP = new SimpleTab();
            oTabP.pack();
            oTabP.show();
    }

    Advice: Please don't mix AWT with Swing components.
    JPanel uses the default FlowLayout, so it's suffice to just code:
    oPanel1.add(oButton1);Or you could do something like this:
    JPanel oPanel1 = new JPanel(new BorderLayout());
    oPanel1.add(oButton1, BorderLayout.NORTH);

  • JTabbedPane lose JList contents

    Hi , this is my first question in the forum :D, i have a problem with a JTabbedPane with two tabs, each with a JList in a JPanel, the problem is that i populate the Jlists in a dynamic way using a vector. the Jlist in the first index (tab) is populated first and then I select the second tab and populate the second Jlist, but when I return to the first tab the Jlist is empty, i guess because it is repainted, which method or what i need to do to keep my JList populated !!

    In the future Swing related questions should be posted in the Swing forum.
    Without seeing your code we can only guess!
    Swing components can't be shared.
    You need to create two JLists, one for each tab.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the [Code Formatting Tags|http://forum.java.sun.com/help.jspa?sec=formatting], so the posted code retains its original formatting.

  • Property change listener error with jtabbedpane

    Greetings
    I have a property change listener on my jtabbedpane (2 panes (index 0 of course and index 1). my problem is when i want to run my app it gives me a java null pointer exception. I believe it is b/c it is starting the app and it see the property change of the first tab at index 0 which is the first tab it sees and tries to run the method that makes the buttons visibility to true. but the buttons are already true. Basically how can I get the property change to run only after the app is visible? I made the buttons visibility false on startup to see if it can run the app but I still got the same error. I hope I am clear enough, if I am not please and I will attempt to reiterate the situation better. thanks for anyones help.
    tabs = new JTabbedPane();
              tabs.addChangeListener(this);
              tabs.setPreferredSize(new java.awt.Dimension(800, 400));
              tabs.addTab("Q", tab1.getMa());
              tabs.addTab("R", tab2);
      public void stateChanged(ChangeEvent changeEvent) {
                JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent.getSource();
               int index = sourceTabbedPane.getSelectedIndex();
               //System.out.println("Tab changed to: " + sourceTabbedPane.getTitleAt(index)+"  Index: "+index);
               if (index==1){
                         changeButtonsF();
                             ///makes buttons false on side panel
               else if (index==0){
                    changeButtonsT();
                     //makes buttons true on side panel
           }

    Basically how can I get the property change to run only after the app is visible?Add the PropertyChangeListener to the tabbed pane after the JFrame is visible.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

  • Listener for a JTabbedPane

    HI all,
    I am trying to update a String on a "summary tab sheet" (in a JTabbedPane) when the tab is selected. When I look in the API, I notice that it has a ChangeEvent associated with it, but I am not quite sure when it fires. I was assuming that it was when any of the tabs were clicked on. The following code compiles and runs, but doesn't execute the code in the stateChanged method that I have defined here. "vehiclePane" is the name of my JTabbedPane. I had the same code (the code in the stateChanged method) in an ActionListener (actionPerformed method) which fired off of a button on the summaryPanel, and it generated the results I wanted into the JTextArea on the summaryPanel. But my assignment calls out to have the String updated when the tab is clicked. I would appreciate any advice!
    vehiclePane.addChangeListener(new ChangeListener()
    public void stateChanged(ChangeEvent e)
    String carOptions = getOptions(myOptions);
    String summaryStatement = ("The Type of Auto is a : " + getType(type)+ "\n\n" +
    carOptions + "\n\nThe Interior Color is: " + color.getIntColor() +
    "\n\nThe Exterior Color is: " + color.getExtColor() +
    "\n\nThe Price of Your Vehicle is: $" + price.getNewPrice());
    setTextArea(summaryStatement);
    });

    Swing related questions should be posted in the Swing forum.
    -> I was assuming that it was when any of the tabs were clicked on.
    You assume correctly. If it doesn't work then you are doing something wrong. Hence the need for a SSCCE.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • Color behind the tabbs of JTabbedPane in SCROLL layout

    Hi all, This is a repost as no one gave me a solution for this problem.
    When SCROLL_TAB_LAYOUT is specified, the color behind the tabbs is not the color of its container. With WRAP layout, the color behind the tabbs is the color of its container.
    Is this a bug? or am I doing wrong?
    If one can execute this code, it would be clear of what I am talking about. Just comment out the tabbPane.setTabLayoutPolicy line and run it again to see the actual behaviour.
    JTabbedPane tabbPane = new JTabbedPane();
    tabbPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    tabbPane.setBackground(Color.white);
    tabbPane.add("one",new JPanel());
    tabbPane.add("two",new JPanel());
    JPanel parentPanel = new JPanel(new BorderLayout());
    parentPanel.setBackground(Color.red); // the color i want to be appeared as the background for tabbed pane and not for tabbs.
    parentPanel.add(tabbPane,BorderLayout.CENTER);
    JFrame jf = new JFrame();
    jf.getContentPane().add(parentPanel);
    jf.pack();
    jf.setVisible(true);
    Thanks in advance.

    Maybe this:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4690946
    Bug ID:      4690946
    Votes      6
    Synopsis      REGRESSION: JTabbedPane.setBackground() and setOpaque() have no effect
    Category      java:classes_swing
    Reported Against      1.4
    Release Fixed      1.5(tiger)
    State      Closed, fixed

  • JTabbedPane Body Color

    Hi i'm new here just learning a lot about java and trying to program a few programs.
    Problem is I want to change the body color NOT the tab color of a jtabbedpane from the grey to white or blue or whatever. I have jpanels added on it and the jpanels have their own set of colors but it doesnt show up. Its that ugly dark grey.
    Not to sure if there is a property i can change i tried them all. And pretty sure its not the look and feel. Can anyone help me out?
    Thanks,
    J

    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.
    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.

  • JTabbedPane, switch of auto resizing of the tab header possible?

    Hi,
    Is it possible to prevent the tab header from auto resizing?
    In this code the tab "Page 1" fills the whole row at start up, but I would like to prevent it from taking more space than needed.
    import java.awt.*;
    import javax.swing.*;
    class TabbedPaneExample
            extends     JFrame
        private        JTabbedPane tabbedPane;
        private        JPanel        panel1;
        private        JPanel        panel2;
        private        JPanel        panel3;
        public TabbedPaneExample()
            // NOTE: to reduce the amount of code in this example, it uses
            // panels with a NULL layout.  This is NOT suitable for
            // production code since it may not display correctly for
            // a look-and-feel.
            setTitle( "Tabbed Pane Application" );
            setSize( 140, 200 );
            setBackground( Color.gray );
            JPanel topPanel = new JPanel();
            topPanel.setLayout( new BorderLayout() );
            getContentPane().add( topPanel );
            // Create the tab pages
            createPage1();
            createPage2();
            createPage3();
            // Create a tabbed pane
            tabbedPane = new JTabbedPane();
            tabbedPane.addTab( "Page 1", panel1 );
            tabbedPane.addTab( "Page 2", panel2 );
            tabbedPane.addTab( "Page 3", panel3 );
            topPanel.add( tabbedPane, BorderLayout.CENTER );
        public void createPage1()
            panel1 = new JPanel();
            panel1.setLayout( null );
        public void createPage2()
            panel2 = new JPanel();
            panel2.setLayout( new BorderLayout() );
        public void createPage3()
            panel3 = new JPanel();
            panel3.setLayout( new GridLayout( 3, 2 ) );
        // Main method to get things started
        public static void main( String[] args )
            // Create an instance of the test application
            TabbedPaneExample mainFrame    = new TabbedPaneExample();
            mainFrame.setVisible( true );
    }Edited by: user6102378 on 2010-okt-07 06:51

    Unfortunately, the answer seems to be "no" - looks like the exact behaviour is even different across different LAFs. Nothing short of re-writing the layout code in the xxTabbedPaneUI will help.
    Just curious: how comes that we have so many tabbedPane related questions recently?
    Cheers
    Jeanette

  • GridBagLayout not working inside jpanel in jtabbedpane

    Have any of you experienced similar behaviour before? Any ideas what could cause this? It seems that any other layout is working except the gridbaglayout. All the components I add will be in the center of the jpanel and on top of each other no matter what gridbagconstraints I use.

    import java.awt.*;
    import javax.swing.*;
    public class GridBag_Demo extends JFrame {
        public GridBag_Demo() {
            initComponents();
        private void initComponents() {
            GridBagConstraints gridBagConstraints;
            tabbedpane = new JTabbedPane();
            panel = new JPanel();
            button1 = new JButton();
            button2 = new JButton();
            button3 = new JButton();
            label1 = new JLabel();
            label2 = new JLabel();
            label3 = new JLabel();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setTitle("GridBag Demo");
            panel.setLayout(new GridBagLayout());
            button1.setText("button1");
            gridBagConstraints = new GridBagConstraints();
            gridBagConstraints.weightx = 1.0;
            gridBagConstraints.weighty = 1.0;
            panel.add(button1, gridBagConstraints);
            button2.setText("button2");
            gridBagConstraints.gridy = 1;
            panel.add(button2, gridBagConstraints);
            button3.setText("button3");
            gridBagConstraints.gridy = 2;
            panel.add(button3, gridBagConstraints);
            label1.setText("label1");
            gridBagConstraints.gridx = 2;
            gridBagConstraints.gridy = 0;
            panel.add(label1, gridBagConstraints);
            label2.setText("label2");
            gridBagConstraints.gridy = 1;
            panel.add(label2, gridBagConstraints);
            label3.setText("label2");
            gridBagConstraints.gridy = 2;
            panel.add(label3, gridBagConstraints);
            tabbedpane.addTab("tab1", panel);
            getContentPane().add(tabbedpane, BorderLayout.CENTER);
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-400)/2, (screenSize.height-300)/2, 400, 300);
        public static void main(String args[]) {
            new GridBag_Demo().setVisible(true);
        private JButton button1;
        private JButton button2;
        private JButton button3;
        private JLabel label1;
        private JLabel label2;
        private JLabel label3;
        private JPanel panel;
        private JTabbedPane tabbedpane;
    }

  • JTabbedPane addChangeListener problem

    My application uses a JTabbedPane. Whenever data has changed on one tab and the user navigates to another I will display a JOptionPane asking if the user wants to save the changed data. My problem is that I want the tab with unsaved data to remain selected until the user has answered yes or no. As is the tab will change and then display the JOptionPane. Strangely this works as intended on some Java versions, but I would like to find a more universal approach.
    is there another way of achieving the desired behaviour?
    My code:
    tabbedPane.addChangeListener(new ChangeListener() {
    public void stateChanged(ChangeEvent evt) {
    if (globalUpdateModel.isModelUpdated()) {
    if (userConfirmedSaveChanges()) {     //this is the metod displaying the JOptionPane
    saveAction.actionPerformed(null);
    } else {
    searchAction.actionPerformed(null);
    });

    tabbedPane.addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent evt) {
                    if (globalUpdateModel.isModelUpdated()) {
                        if (userConfirmedSaveChanges()) {
                            saveAction.actionPerformed(null);
                        } else {
                            searchAction.actionPerformed(null);
            });

  • JTabbedPane keeps track of last selected tab

    Hi everybody,
    experiencing some problems with swing...
    I've got a javax.swing.JTabbedPane whose behaviour is kind of strange: I need my application to have always the same tab selected at initialisation, which is very simple in theory. In my initialisation method I just do:
    MainTab.setSelectedIndex(0);
    But instead of selecting the first tab (index 0), it keeps selected the one I last chose in the previous run.
    Any idea?
    Thanks in advance.
    JON HAITZ

    Hi calvino_ind,
    I am unfortunately not allowed to disclose my entire code, but I'm posting the code part where the problem may lie so that you can try to guess where the problem comes from:
    public class VitalSignMonitorView extends FrameView {
    public VitalSignMonitorView(SingleFrameApplication app) {
    super(app);
    initComponents();
    init();
    // status bar initialization - message timeout, idle icon and busy animation, etc
    ResourceMap resourceMap = getResourceMap();
    int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
    messageTimer = new Timer(messageTimeout, new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    statusMessageLabel.setText("");
    messageTimer.setRepeats(false);
    int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
    for (int i = 0; i < busyIcons.length; i++) {
    busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
    busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
    statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
    idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
    statusAnimationLabel.setIcon(idleIcon);
    progressBar.setVisible(false);
    // connecting action tasks to status bar via TaskMonitor
    TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
    taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    String propertyName = evt.getPropertyName();
    if ("started".equals(propertyName)) {
    if (!busyIconTimer.isRunning()) {
    statusAnimationLabel.setIcon(busyIcons[0]);
    busyIconIndex = 0;
    busyIconTimer.start();
    progressBar.setVisible(true);
    progressBar.setIndeterminate(true);
    } else if ("done".equals(propertyName)) {
    busyIconTimer.stop();
    statusAnimationLabel.setIcon(idleIcon);
    progressBar.setVisible(false);
    progressBar.setValue(0);
    } else if ("message".equals(propertyName)) {
    String text = (String)(evt.getNewValue());
    statusMessageLabel.setText((text == null) ? "" : text);
    messageTimer.restart();
    } else if ("progress".equals(propertyName)) {
    int value = (Integer)(evt.getNewValue());
    progressBar.setVisible(true);
    progressBar.setIndeterminate(false);
    progressBar.setValue(value);
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    mainPanel = new javax.swing.JPanel();
    MainTab = new javax.swing.JTabbedPane();
    panelWelcome = new javax.swing.JPanel();
    labelPatientChoice = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    tablePatientList = new javax.swing.JTable();
    buttonSelectPatient = new javax.swing.JButton();
    buttonCreatePatient = new javax.swing.JButton();
    jSeparator5 = new javax.swing.JSeparator();
    panelPatient = new javax.swing.JPanel();
    jSeparator1 = new javax.swing.JSeparator();
    jSeparator2 = new javax.swing.JSeparator();
    jSeparator3 = new javax.swing.JSeparator();
    jSeparator4 = new javax.swing.JSeparator();
    m_PanelPI = new javax.swing.JPanel();
    mPI_LabelSex = new javax.swing.JLabel();
    mPI_LabelName = new javax.swing.JLabel();
    mPI_Name = new javax.swing.JTextField();
    mPI_LabelSurname = new javax.swing.JLabel();
    mPI_Surname = new javax.swing.JTextField();
    mPI_LabelBirthDate = new javax.swing.JLabel();
    mPI_BirthDateChooser = new com.toedter.calendar.JDateChooser();
    mPI_SexComboBox = new javax.swing.JComboBox();
    m_PanelAI = new javax.swing.JPanel();
    mAI_LabelWeight = new javax.swing.JLabel();
    mAI_Height = new javax.swing.JTextField();
    mAI_LabelHeight = new javax.swing.JLabel();
    mAI_Weight = new javax.swing.JTextField();
    m_PanelSI = new javax.swing.JPanel();
    mSI_CentreRegDate = new javax.swing.JLabel();
    mSI_LabelSystemRegDate = new javax.swing.JLabel();
    mSI_CentreRegDateChooser = new com.toedter.calendar.JDateChooser();
    mSI_SystemRegDateFormattedTextField = new javax.swing.JFormattedTextField();
    jButton1 = new javax.swing.JButton();
    mG_PatientId = new javax.swing.JTextField();
    mG_LabelPatientId = new javax.swing.JLabel();
    jButton2 = new javax.swing.JButton();
    panelContactPerson = new javax.swing.JPanel();
    panelIllness = new javax.swing.JPanel();
    panelDrugs = new javax.swing.JPanel();
    panelDevice = new javax.swing.JPanel();
    panelMeasurement = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    listMeasurementType = new javax.swing.JList();
    labelSelectMeasurementType = new javax.swing.JLabel();
    jSeparator6 = new javax.swing.JSeparator();
    jScrollPane3 = new javax.swing.JScrollPane();
    tableMeasurements = new javax.swing.JTable();
    labelTableMeasurements = new javax.swing.JLabel();
    jSeparator7 = new javax.swing.JSeparator();
    labelSelectedMeasurementType = new javax.swing.JLabel();
    textFieldSelectedMeasurementType = new javax.swing.JTextField();
    panelMeasurementDisplay = new javax.swing.JPanel();
    jTextFieldSelectedPatient = new javax.swing.JTextField();
    jLabel14 = new javax.swing.JLabel();
    menuBar = new javax.swing.JMenuBar();
    javax.swing.JMenu fileMenu = new javax.swing.JMenu();
    javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
    javax.swing.JMenu helpMenu = new javax.swing.JMenu();
    javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
    statusPanel = new javax.swing.JPanel();
    javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
    statusMessageLabel = new javax.swing.JLabel();
    statusAnimationLabel = new javax.swing.JLabel();
    progressBar = new javax.swing.JProgressBar();
    mainPanel.setAutoscrolls(true);
    mainPanel.setName("mainPanel"); // NOI18N
    MainTab.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
    org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(vitalsignmonitor.VitalSignMonitorApp.class).getContext().getResourceMap(VitalSignMonitorView.class);
    MainTab.setToolTipText(resourceMap.getString("MainTab.toolTipText")); // NOI18N
    MainTab.setName("MainTab"); // NOI18N
    panelWelcome.setToolTipText(resourceMap.getString("panelWelcome.toolTipText")); // NOI18N
    panelWelcome.setEnabled(false);
    panelWelcome.setName("panelWelcome"); // NOI18N
    labelPatientChoice.setFont(resourceMap.getFont("labelPatientChoice.font")); // NOI18N
    labelPatientChoice.setText(resourceMap.getString("labelPatientChoice.text")); // NOI18N
    labelPatientChoice.setEnabled(false);
    labelPatientChoice.setName("labelPatientChoice"); // NOI18N
    jScrollPane1.setName("jScrollPane1"); // NOI18N
    tablePatientList.setAutoCreateRowSorter(true);
    tablePatientList.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    new String [] {
    "Patient_ID", "Surname", "Name"
    boolean[] canEdit = new boolean [] {
    false, false, false
    public boolean isCellEditable(int rowIndex, int columnIndex) {
    return canEdit [columnIndex];
    tablePatientList.setName("tablePatientList"); // NOI18N
    tablePatientList.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    tablePatientListMouseClicked(evt);
    jScrollPane1.setViewportView(tablePatientList);
    buttonSelectPatient.setText(resourceMap.getString("buttonSelectPatient.text")); // NOI18N
    buttonSelectPatient.setName("buttonSelectPatient"); // NOI18N
    buttonSelectPatient.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    buttonSelectPatientMouseClicked(evt);
    buttonCreatePatient.setText(resourceMap.getString("buttonCreatePatient.text")); // NOI18N
    buttonCreatePatient.setName("buttonCreatePatient"); // NOI18N
    buttonCreatePatient.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    buttonCreatePatientMouseClicked(evt);
    jSeparator5.setName("jSeparator5"); // NOI18N
    javax.swing.GroupLayout panelWelcomeLayout = new javax.swing.GroupLayout(panelWelcome);
    panelWelcome.setLayout(panelWelcomeLayout);
    panelWelcomeLayout.setHorizontalGroup(
    panelWelcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(panelWelcomeLayout.createSequentialGroup()
    .addGap(20, 20, 20)
    .addGroup(panelWelcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE)
    .addComponent(jSeparator5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE)
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelWelcomeLayout.createSequentialGroup()
    .addComponent(labelPatientChoice, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelWelcomeLayout.createSequentialGroup()
    .addComponent(buttonSelectPatient)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)
    .addComponent(buttonCreatePatient)))
    .addGap(514, 514, 514))
    panelWelcomeLayout.setVerticalGroup(
    panelWelcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(panelWelcomeLayout.createSequentialGroup()
    .addGap(19, 19, 19)
    .addGroup(panelWelcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(buttonSelectPatient)
    .addComponent(buttonCreatePatient))
    .addGap(11, 11, 11)
    .addComponent(labelPatientChoice)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(13, 13, 13)
    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE)
    .addGap(29, 29, 29))
    MainTab.addTab(resourceMap.getString("panelWelcome.TabConstraints.tabTitle"), panelWelcome); // NOI18N
    panelPatient.setFocusable(false);
    panelPatient.setName("panelPatient"); // NOI18N
    panelPatient.addComponentListener(new java.awt.event.ComponentAdapter() {
    public void componentShown(java.awt.event.ComponentEvent evt) {
    panelPatientComponentShown(evt);
    jSeparator1.setName("jSeparator1"); // NOI18N
    jSeparator2.setName("jSeparator2"); // NOI18N
    jSeparator3.setName("jSeparator3"); // NOI18N
    jSeparator4.setName("jSeparator4"); // NOI18N
    m_PanelPI.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("m_PanelPI.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("m_PanelPI.border.titleFont"))); // NOI18N
    m_PanelPI.setName("m_PanelPI"); // NOI18N
    mPI_LabelSex.setText(resourceMap.getString("mPI_LabelSex.text")); // NOI18N
    mPI_LabelSex.setName("mPI_LabelSex"); // NOI18N
    mPI_LabelName.setText(resourceMap.getString("mPI_LabelName.text")); // NOI18N
    mPI_LabelName.setName("mPI_LabelName"); // NOI18N
    mPI_Name.setBackground(resourceMap.getColor("mPI_Name.background")); // NOI18N
    mPI_Name.setText(resourceMap.getString("mPI_Name.text")); // NOI18N
    mPI_Name.setDisabledTextColor(resourceMap.getColor("mPI_Name.disabledTextColor")); // NOI18N
    mPI_Name.setName("mPI_Name"); // NOI18N
    mPI_LabelSurname.setText(resourceMap.getString("mPI_LabelSurname.text")); // NOI18N
    mPI_LabelSurname.setName("mPI_LabelSurname"); // NOI18N
    mPI_Surname.setText(resourceMap.getString("mPI_Surname.text")); // NOI18N
    mPI_Surname.setDisabledTextColor(resourceMap.getColor("mPI_Surname.disabledTextColor")); // NOI18N
    mPI_Surname.setName("mPI_Surname"); // NOI18N
    mPI_LabelBirthDate.setText(resourceMap.getString("mPI_LabelBirthDate.text")); // NOI18N
    mPI_LabelBirthDate.setName("mPI_LabelBirthDate"); // NOI18N
    mPI_BirthDateChooser.setBackground(resourceMap.getColor("mPI_BirthDateChooser.background")); // NOI18N
    mPI_BirthDateChooser.setName("mPI_BirthDateChooser"); // NOI18N
    mPI_SexComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Male", "Female" }));
    mPI_SexComboBox.setName("mPI_SexComboBox"); // NOI18N
    javax.swing.GroupLayout m_PanelPILayout = new javax.swing.GroupLayout(m_PanelPI);
    m_PanelPI.setLayout(m_PanelPILayout);
    m_PanelPILayout.setHorizontalGroup(
    m_PanelPILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(m_PanelPILayout.createSequentialGroup()
    .addContainerGap()
    .addGroup(m_PanelPILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addGroup(m_PanelPILayout.createSequentialGroup()
    .addComponent(mPI_LabelName, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(mPI_Name, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(m_PanelPILayout.createSequentialGroup()
    .addComponent(mPI_LabelSurname, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(mPI_Surname, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(m_PanelPILayout.createSequentialGroup()
    .addComponent(mPI_LabelBirthDate, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(mPI_BirthDateChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addGroup(m_PanelPILayout.createSequentialGroup()
    .addComponent(mPI_LabelSex, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(mPI_SexComboBox, 0, 159, Short.MAX_VALUE)))
    .addContainerGap(36, Short.MAX_VALUE))
    m_PanelPILayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {mPI_Name, mPI_Surname});
    m_PanelPILayout.setVerticalGroup(
    m_PanelPILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(m_PanelPILayout.createSequentialGroup()
    .addContainerGap()
    .addGroup(m_PanelPILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(mPI_LabelName, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mPI_Name, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(m_PanelPILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(mPI_LabelSurname, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mPI_Surname, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(m_PanelPILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(mPI_LabelBirthDate, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mPI_BirthDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(m_PanelPILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(mPI_LabelSex, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mPI_SexComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    m_PanelAI.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("m_PanelAI.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("m_PanelAI.border.titleFont"))); // NOI18N
    m_PanelAI.setName("m_PanelAI"); // NOI18N
    mAI_LabelWeight.setText(resourceMap.getString("mAI_LabelWeight.text")); // NOI18N
    mAI_LabelWeight.setName("mAI_LabelWeight"); // NOI18N
    mAI_Height.setDisabledTextColor(resourceMap.getColor("mAI_Height.disabledTextColor")); // NOI18N
    mAI_Height.setName("mAI_Height"); // NOI18N
    mAI_LabelHeight.setText(resourceMap.getString("mAI_LabelHeight.text")); // NOI18N
    mAI_LabelHeight.setName("mAI_LabelHeight"); // NOI18N
    mAI_Weight.setDisabledTextColor(resourceMap.getColor("mAI_Weight.disabledTextColor")); // NOI18N
    mAI_Weight.setName("mAI_Weight"); // NOI18N
    javax.swing.GroupLayout m_PanelAILayout = new javax.swing.GroupLayout(m_PanelAI);
    m_PanelAI.setLayout(m_PanelAILayout);
    m_PanelAILayout.setHorizontalGroup(
    m_PanelAILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(m_PanelAILayout.createSequentialGroup()
    .addContainerGap()
    .addGroup(m_PanelAILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(mAI_LabelHeight, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mAI_LabelWeight, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(m_PanelAILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(mAI_Weight, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mAI_Height, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(38, Short.MAX_VALUE))
    m_PanelAILayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {mAI_Height, mAI_Weight});
    m_PanelAILayout.setVerticalGroup(
    m_PanelAILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(m_PanelAILayout.createSequentialGroup()
    .addContainerGap()
    .addGroup(m_PanelAILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(mAI_Weight, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mAI_LabelWeight, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(m_PanelAILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(mAI_LabelHeight, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mAI_Height, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    m_PanelSI.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("m_PanelSI.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("m_PanelSI.border.titleFont"))); // NOI18N
    m_PanelSI.setName("m_PanelSI"); // NOI18N
    mSI_CentreRegDate.setText(resourceMap.getString("mSI_CentreRegDate.text")); // NOI18N
    mSI_CentreRegDate.setName("mSI_CentreRegDate"); // NOI18N
    mSI_LabelSystemRegDate.setText(resourceMap.getString("mSI_LabelSystemRegDate.text")); // NOI18N
    mSI_LabelSystemRegDate.setName("mSI_LabelSystemRegDate"); // NOI18N
    mSI_CentreRegDateChooser.setBackground(resourceMap.getColor("mSI_CentreRegDateChooser.background")); // NOI18N
    mSI_CentreRegDateChooser.setName("mSI_CentreRegDateChooser"); // NOI18N
    mSI_SystemRegDateFormattedTextField.setBackground(resourceMap.getColor("mSI_SystemRegDateFormattedTextField.background")); // NOI18N
    mSI_SystemRegDateFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter()));
    mSI_SystemRegDateFormattedTextField.setText(resourceMap.getString("mSI_SystemRegDateFormattedTextField.text")); // NOI18N
    mSI_SystemRegDateFormattedTextField.setDisabledTextColor(resourceMap.getColor("mSI_SystemRegDateFormattedTextField.disabledTextColor")); // NOI18N
    mSI_SystemRegDateFormattedTextField.setEnabled(false);
    mSI_SystemRegDateFormattedTextField.setName("mSI_SystemRegDateFormattedTextField"); // NOI18N
    javax.swing.GroupLayout m_PanelSILayout = new javax.swing.GroupLayout(m_PanelSI);
    m_PanelSI.setLayout(m_PanelSILayout);
    m_PanelSILayout.setHorizontalGroup(
    m_PanelSILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(m_PanelSILayout.createSequentialGroup()
    .addContainerGap()
    .addGroup(m_PanelSILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(mSI_LabelSystemRegDate, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(mSI_CentreRegDate, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(m_PanelSILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(mSI_CentreRegDateChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(mSI_SystemRegDateFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE))
    .addContainerGap(44, Short.MAX_VALUE))
    m_PanelSILayout.setVerticalGroup(
    m_PanelSILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(m_PanelSILayout.createSequentialGroup()
    .addContainerGap()
    .addGroup(m_PanelSILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(mSI_LabelSystemRegDate, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mSI_SystemRegDateFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(m_PanelSILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(mSI_CentreRegDate, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(mSI_CentreRegDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
    jButton1.setEnabled(false);
    jButton1.setName("jButton1"); // NOI18N
    jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    ButtonSavePatientDataMouseClicked(evt);
    mG_PatientId.setText(resourceMap.getString("mG_PatientId.text")); // NOI18N
    mG_PatientId.setDisabledTextColor(resourceMap.getColor("mG_PatientId.disabledTextColor")); // NOI18N
    mG_PatientId.setName("mG_PatientId"); // NOI18N
    mG_LabelPatientId.setText(resourceMap.getString("mG_LabelPatientId.text")); // NOI18N
    mG_LabelPatientId.setName("mG_LabelPatientId"); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    jButton2.setName("jButton2"); // NOI18N
    jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    ButtonModifyPatientDataMouseClicked(evt);
    javax.swing.GroupLayout panelPatientLayout = new javax.swing.GroupLayout(panelPatient);
    panelPatient.setLayout(panelPatientLayout);
    panelPatientLayout.setHorizontalGroup(
    panelPatientLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(panelPatientLayout.createSequentialGroup()
    .addGroup(panelPatientLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(panelPatientLayout.createSequentialGroup()
    .addContainerGap()
    .addGroup(panelPatientLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(m_PanelSI, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(m_PanelAI, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(m_PanelPI, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addGap(515, 515, 515)
    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(5, 5, 5)
    .addComponent(jSeparator2, javax.swing.Group

  • ATTN : JTabbedPane Display Error

    Hi,
    I am having problem in having the correct display in GUI. I am using JTabbedPane for displaying more than one conditions in an application.
    I have added one condition (i.e. one tab) in tabbed pane. The display of this tab is correct. I wish to add other tab depending whether certain operation is performed on first tab. The second tab is added to the pane but when I switch from first tab to second tab. The display shows arbit behaviour. The panels which I am adding in both the tabs are almost identical. These panels have a bit complex layout and have many components. When I move from tab1 to tab2, many of the components are not drawn & the few which are drawn become invisible in some operation (like the textfield disappears, but when one starts writting in the location it comes in any random manner).
    Hoping for a fast response.
    Thanks in advance.
    Regards,
    shree

    Hi Paills,
    The above error will get two reasons.
    1. Database is not running or TNs listener also not running.
    2. In RPD go to physical layer --> please extend your datasourename --> Click connection pool --> please verify the datasourename and username and password details.
    The above two reasons only the error is occurring.
    Award point it is useful.
    Thank
    satya.

Maybe you are looking for

  • How to use another computers internet for your own?

    I tried using my brothers wireless wifi, i tried using internet sharing on his computer and fonnected us through bluetooth but it wont work i tried everything with internet sharing and it wont work what could be the problem? I cant connect to his wif

  • How can I add custom right-click-menu to column headers in JTable?

    Can anyone point me to a topic on how to customize a popup menu for column headers in JTable? Specifically, I want to add things like "auto-size column" and "hide column". Thanks, Matt

  • Change Report Labels

    Hi all, in my classic report i break the report for the Column1 and i need to change the labels of the headers depend of value of Column 1 in the current row in the query. I saw that i can insert PL/SQL code to set the report labels, but how can i ch

  • Selected rows in tableview

    Hello, Using a tableview with table iterator, the user can select one or more lines and delete them by using a button. A server event is triggered then to delete the data on the database. But afterwards the tableview appears with the same row indexes

  • Update causes Firefox to disappear?

    When I tried updating Firefox on my Mac (an automatic update), it took an unusually long time, my computer went into hibernation, and now Firefox seems to have completely disappeared off of my computer. I search and cannot find it anywhere.