Package java.awt

Examples of java.awt.Label$State


        return dialog.mConnection;
    }

    protected static Label createLabel(String s) {

        Label l = new Label(s);

        l.setBackground(SystemColor.control);

        return l;
    }
View Full Code Here


      panel.add(scroll,         BorderLayout.CENTER);

      Panel cmdPanel = new Panel(new BorderLayout());

      cmdLabel = new Label("> ");
      cmdPanel.add(cmdLabel,        BorderLayout.WEST);
      cmdPanel.add(tfCmd,           BorderLayout.CENTER);

      panel.add(cmdPanel,        BorderLayout.SOUTH);
View Full Code Here

        o3 = new Canvas();
        o3.setBackground(Color.blue);
        o3.setBounds(50, 500, 200, 200);

        o4 = new Label("I am a label");
        o4.setForeground(Color.red);
        o4.setFont(new Font("Sansserif", Font.BOLD, 48));
        o4.setBounds(400, 600, 400, 50);

        p.add(o1);
View Full Code Here

        String instance = element.getAttribute("instance");
        if (instance == null)
        {
            instance = element.getAttribute("class");
        }
        Label lbl = new Label(instance);
        return lbl;
    }
View Full Code Here

        // TODO Auto-generated constructor stub
    }

    public Object createComponentInstance(Object parent, DomNode element)
    {
        Label lbl = new Label();
        return lbl;
    }
View Full Code Here

    }

    public Object updateUI(Object com, DomNode element)
    {
        super.updateUI(com, element);
        Label lbl = (Label) com;
        String label = (String) element.getAttribute("text");
        lbl.setText(label);
        return lbl;
    }
View Full Code Here

         setBackground(Color.black);
         setForeground(Color.white);
        
         Font consoleFont = new Font("Arial", Font.BOLD, 14);
        
         Label slickLabel = new Label("SLICK CONSOLE", Label.CENTER);
         slickLabel.setFont(consoleFont);
         add(slickLabel, BorderLayout.PAGE_START);
        
         StringWriter sw = new StringWriter();
         e.printStackTrace(new PrintWriter(sw));
        
         textArea.setText(sw.toString());
         textArea.setEditable(false);
         add(textArea, BorderLayout.CENTER);
        
         // add a border on both sides of the console
         add(new Panel(), BorderLayout.LINE_START);
         add(new Panel(), BorderLayout.LINE_END);
        
         Panel bottomPanel = new Panel();
         bottomPanel.setLayout(new GridLayout(0, 1));
         Label infoLabel1 = new Label("An error occured while running the applet.", Label.CENTER);
         Label infoLabel2 = new Label("Plese contact support to resolve this issue.", Label.CENTER);
         infoLabel1.setFont(consoleFont);
         infoLabel2.setFont(consoleFont);
         bottomPanel.add(infoLabel1);
         bottomPanel.add(infoLabel2);
         add(bottomPanel, BorderLayout.PAGE_END);
      }
View Full Code Here

    MenuBar mb = new MenuBar();
    createMenus(mb);
    frame.setMenuBar(mb);

    //---- first section
    Label suiteLabel= new Label("Test class name:");

    fSuiteField= new TextField(suiteName != null ? suiteName : "");
    fSuiteField.selectAll();
    fSuiteField.requestFocus();
    fSuiteField.setFont(PLAIN_FONT);
    fSuiteField.setColumns(40);
    fSuiteField.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          runSuite();
        }
      }
    );
    fSuiteField.addTextListener(
      new TextListener() {
        public void textValueChanged(TextEvent e) {
          fRun.setEnabled(fSuiteField.getText().length() > 0);
          fStatusLine.setText("");
        }
      }
    );
    fRun= new Button("Run");
    fRun.setEnabled(false);
    fRun.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          runSuite();
        }
      }
    );
    boolean useLoader= useReloadingTestSuiteLoader();
    fUseLoadingRunner= new Checkbox("Reload classes every run", useLoader);
    if (inVAJava())
      fUseLoadingRunner.setVisible(false);

    //---- second section
    fProgressIndicator= new ProgressBar();

    //---- third section
    fNumberOfErrors= new Label("0000", Label.RIGHT);
    fNumberOfErrors.setText("0");
    fNumberOfErrors.setFont(PLAIN_FONT);

    fNumberOfFailures= new Label("0000", Label.RIGHT);
    fNumberOfFailures.setText("0");
    fNumberOfFailures.setFont(PLAIN_FONT);

    fNumberOfRuns= new Label("0000", Label.RIGHT);
    fNumberOfRuns.setText("0");
    fNumberOfRuns.setFont(PLAIN_FONT);

    Panel numbersPanel= createCounterPanel();

    //---- fourth section
    Label failureLabel= new Label("Errors and Failures:");

    fFailureList= new List(5);
    fFailureList.addItemListener(
      new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
View Full Code Here

  protected Panel createCounterPanel() {
    Panel numbersPanel= new Panel(new GridBagLayout());
    addToCounterPanel(
      numbersPanel,
      new Label("Runs:"),
      0, 0, 1, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0)
    )
    addToCounterPanel(
      numbersPanel,
      fNumberOfRuns,
            1, 0, 1, 1, 0.33, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
            new Insets(0, 8, 0, 40)
    );
    addToCounterPanel(
      numbersPanel,
      new Label("Errors:"),
            2, 0, 1, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.NONE,
            new Insets(0, 8, 0, 0)
    );
    addToCounterPanel(
      numbersPanel,
      fNumberOfErrors,
            3, 0, 1, 1, 0.33, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
            new Insets(0, 8, 0, 40)
    );
    addToCounterPanel(
      numbersPanel,
      new Label("Failures:"),
            4, 0, 1, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.NONE,
            new Insets(0, 8, 0, 0)
    )
    addToCounterPanel(
View Full Code Here

      frame = this; // Make visible to ButtonHandler
      setSize(320,200);

      // Create a panel for the message itself
      Panel center = new Panel();
      center.add(new Label(message));

      // Create a panel for the 'OK' button
      Panel bottom = new Panel();
      Button okButton = new Button("   OK   ");
      okButton.addActionListener(new ButtonHandler());
View Full Code Here

TOP

Related Classes of java.awt.Label$State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.