| | |
| | | scroll.getViewport().setOpaque(false); |
| | | scroll.getViewport().setBackground(ColorAndFontConstants.background); |
| | | scroll.setBackground(ColorAndFontConstants.background); |
| | | setScrollIncrementUnit(scroll); |
| | | return scroll; |
| | | } |
| | | |
| | |
| | | scroll.setOpaque(false); |
| | | scroll.getViewport().setBackground(ColorAndFontConstants.background); |
| | | scroll.setBackground(ColorAndFontConstants.background); |
| | | setScrollIncrementUnit(scroll); |
| | | return scroll; |
| | | } |
| | | |
| | | /** |
| | | * Sets the scroll increment unit for the scroll. |
| | | * @param scroll the scroll to be updated. |
| | | */ |
| | | public static void setScrollIncrementUnit(JScrollPane scroll) |
| | | { |
| | | if (scroll.getVerticalScrollBar() != null) |
| | | { |
| | | int increment = scroll.getVerticalScrollBar().getUnitIncrement(); |
| | | scroll.getVerticalScrollBar().setUnitIncrement(increment * 3); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Creates a button. |
| | | * @param text the message to be displayed by the button. |
| | | * @return the created button. |