Available Methods
- setBorder ( )
- setPreferredSize ( )
- setViewportView ( )
- setVerticalScrollBarPolicy ( )
- setHorizontalScrollBarPolicy ( )
- VERTICAL_SCROLLBAR_AS_NEEDED
- setMinimumSize ( )
- setBackground ( )
- HORIZONTAL_SCROLLBAR_NEVER
- HORIZONTAL_SCROLLBAR_AS_NEEDED
- setViewportBorder ( )
- setBounds ( )
- VERTICAL_SCROLLBAR_ALWAYS
- setAutoscrolls ( )
- setOpaque ( )
- setRowHeaderView ( )
- setCorner ( )
- addPropertyChangeListener ( )
- setName ( )
- HORIZONTAL_SCROLLBAR_ALWAYS
- setColumnHeaderView ( )
- setMaximumSize ( )
- getHorizontalScrollBar ( )
- setAlignmentX ( )
- setSize ( )
- addComponentListener ( )
- getPreferredSize ( )
- VERTICAL_SCROLLBAR_NEVER
- getViewport ( )
- getComponent ( )
- setWheelScrollingEnabled ( )
- getSize ( )
- add ( )
- createHorizontalScrollBar ( )
- setRowHeader ( )
- setVisible ( )
Related Classes
- java.io.File
- java.awt.Color
- java.awt.event.ActionEvent
- java.awt.event.ActionListener
- javax.swing.JPanel
- java.awt.Dimension
- javax.swing.JFrame
- java.awt.Font
- java.awt.event.MouseEvent
- javax.swing.JLabel
- javax.swing.JButton
- java.awt.event.KeyEvent
- java.awt.BorderLayout
- javax.swing.JOptionPane
- java.awt.Component
- java.awt.event.WindowEvent
- javax.swing.JTextField
- javax.swing.SwingUtilities
- java.awt.event.MouseAdapter
- javax.swing.ImageIcon
- javax.swing.JComponent
- java.awt.event.WindowAdapter
- javax.swing.JCheckBox
- javax.swing.UIManager
- javax.swing.JComboBox
Java Code Examples for javax.swing.JScrollPane#getSize()
The following examples show how to use
javax.swing.JScrollPane#getSize() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleInfoBox.java From SPIM_Registration with GNU General Public License v2.0 | 6 votes |
public SimpleInfoBox( final String title, final String text ) { frame = new JFrame( title ); final JTextArea textarea = new JTextArea( text ); final JPanel panel = new JPanel(); panel.add( textarea, BorderLayout.CENTER ); final JScrollPane pane = new JScrollPane( panel ); frame.add( pane, BorderLayout.CENTER ); frame.pack(); final Dimension d = pane.getSize(); d.setSize( d.width + 20, d.height + 10 ); pane.setSize( d ); pane.setPreferredSize( d ); frame.setPreferredSize( d ); frame.pack(); frame.setVisible( true ); }
Example 2
Source File: AnnotateScreenCapture.java From marathonv5 with Apache License 2.0 | 5 votes |
private Component getAnnotationPanel() { JScrollPane scrollPane = new JScrollPane(new AnnotationPanel(imagePanel, !edit), JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); Dimension dimension = scrollPane.getSize(); dimension.width = 250; scrollPane.setPreferredSize(dimension); return scrollPane; }