source: java/main/src/main/java/com/framsticks/util/swing/Layout.java @ 193

Last change on this file since 193 was 193, checked in by Maciej Komosinski, 10 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
File size: 606 bytes
Line 
1package com.framsticks.util.swing;
2
3
4import javax.swing.*;
5import java.awt.*;
6
7/**
8 * @author Piotr Sniegowski
9 */
10public class Layout {
11        public static void fixComponentSize(JComponent component, Dimension dimension) {
12                component.setPreferredSize(dimension);
13                component.setMaximumSize(dimension);
14                component.setMaximumSize(dimension);
15        }
16
17        public static void copyComponentDimensions(JComponent destination, JComponent source) {
18                destination.setPreferredSize(source.getPreferredSize());
19                destination.setMaximumSize(source.getMaximumSize());
20                destination.setMinimumSize(source.getMinimumSize());
21        }
22
23}
Note: See TracBrowser for help on using the repository browser.