Package javax.swing

Examples of javax.swing.JScrollPane


                             createTitledBorder("Knowledge Flow Layout"),
                    javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5)
                    )); */
      BeanLayout tabBeanLayout = new BeanLayout();

      final JScrollPane js = new JScrollPane(tabBeanLayout);
      p1.add(js, BorderLayout.CENTER);
      js.getVerticalScrollBar().setUnitIncrement(m_ScrollBarIncrementLayout);
      js.getHorizontalScrollBar().setUnitIncrement(m_ScrollBarIncrementLayout);


      configureBeanLayout(tabBeanLayout);
      m_beanLayouts.add(tabBeanLayout);

View Full Code Here


      final javax.swing.JFrame jf = new javax.swing.JFrame();
      jf.getContentPane().setLayout(new java.awt.BorderLayout());
      final JTextArea ta = new JTextArea(helpHolder.toString());
      ta.setFont(new Font("Monospaced", Font.PLAIN, 12));
      ta.setEditable(false);
      final JScrollPane sp = new JScrollPane(ta);
      jf.getContentPane().add(sp, java.awt.BorderLayout.CENTER);
      jf.addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent e) {
          tempB.setEnabled(true);
          jf.dispose();
View Full Code Here

      JTextArea textArea = new JTextArea(lines, 60);
      textArea.setEditable(false);
      textArea.setText(description);
      textArea.setCaretPosition(0);
     
      JScrollPane scrollPane = new JScrollPane(textArea);   
      scrollPane.setPreferredSize(new Dimension(350, 150));
      JOptionPane.showMessageDialog(parent, scrollPane,
          Strings.get("fileErrorTitle"), JOptionPane.ERROR_MESSAGE);
    } else {
      JOptionPane.showMessageDialog(parent, description,
          Strings.get("fileErrorTitle"), JOptionPane.ERROR_MESSAGE);
View Full Code Here

    open.addActionListener(myListener);
    save.addActionListener(myListener);
    close.addActionListener(myListener);
   
    Dimension pref = editor.getPreferredSize();
    JScrollPane scroll = new JScrollPane(editor,
        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
        JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    pref.height = Math.min(pref.height, pref.width * 3 / 2);
    scroll.setPreferredSize(pref);
    scroll.getViewport().setBackground(editor.getBackground());

    Container contents = getContentPane();
    contents.add(scroll, BorderLayout.CENTER);
    contents.add(buttonPanel, BorderLayout.SOUTH);

View Full Code Here

      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.insets = new Insets(5, 0, 5, 0);
      gbc.fill = GridBagConstraints.NONE;
      addGb(new JLabel(Strings.get("labelCircuits") + " "));
      gbc.fill = GridBagConstraints.HORIZONTAL;
      addGb(new JScrollPane(list));
      gbc.fill = GridBagConstraints.NONE;
     
      gbc.gridy++;
      addGb(new JLabel(Strings.get("labelHeader") + " "));
      addGb(header);
View Full Code Here

    Toolbar toolbar = new Toolbar(toolbarModel);
    add(toolbar, BorderLayout.NORTH);
   
    toolbox = new ProjectExplorer(proj);
    toolbox.setListener(new ToolboxManip(proj, toolbox));
    add(new JScrollPane(toolbox), BorderLayout.CENTER);
  }
View Full Code Here

    JPanel selectorPanel = selector.createPanel();
    gb.setConstraints(selectorPanel, gc); add(selectorPanel);
    gb.setConstraints(prettyView, gc); add(prettyView);
      Insets oldInsets = gc.insets;
      gc.insets = new Insets(10, 10, 0, 10);
      JScrollPane fieldPane = new JScrollPane(field,
          ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
          ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    gb.setConstraints(fieldPane, gc); add(fieldPane);
      gc.insets = oldInsets;
      gc.fill = GridBagConstraints.NONE;
View Full Code Here

      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.insets = new Insets(5, 0, 5, 0);
      gbc.fill = GridBagConstraints.NONE;
      addGb(new JLabel(Strings.get("labelCircuits") + " "));
      gbc.fill = GridBagConstraints.HORIZONTAL;
      addGb(new JScrollPane(list));
      gbc.fill = GridBagConstraints.NONE;
     
      gbc.gridy++;
      addGb(new JLabel(Strings.get("labelImageFormat") + " "));
      Box formatsPanel = new Box(BoxLayout.Y_AXIS);
View Full Code Here

    setJMenuBar(menubar);
    editListener.register(menubar);
  }
 
  private void addTab(int index, final JComponent comp) {
    final JScrollPane pane = new JScrollPane(comp,
        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    if (comp instanceof TableTab) {
      pane.setVerticalScrollBar(((TableTab) comp).getVerticalScrollBar());
    }
    pane.addComponentListener(new ComponentListener() {
      public void componentResized(ComponentEvent event) {
        int width = pane.getViewport().getWidth();
        comp.setSize(new Dimension(width, comp.getHeight()));
      }

      public void componentMoved(ComponentEvent arg0) { }
      public void componentShown(ComponentEvent arg0) { }
View Full Code Here

    TableSorter mySorter = new TableSorter(model, table.getTableHeader());
    Comparator<String> comp = new CompareString("",
        Strings.get("statsTotalWithout"), Strings.get("statsTotalWith"));
    mySorter.setColumnComparator(String.class, comp);
    table.setModel(mySorter);
    JScrollPane tablePane = new JScrollPane(table);
   
    JButton button = new JButton(Strings.get("statsCloseButton"));
    button.addActionListener(this);
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(button);
View Full Code Here

TOP

Related Classes of javax.swing.JScrollPane

Copyright © 2015 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.