Last change
on this file since 77 was
77,
checked in by psniegowski, 11 years ago
|
Add new java codebase.
|
File size:
600 bytes
|
Line | |
---|
1 | package com.framsticks.util; |
---|
2 | |
---|
3 | |
---|
4 | import javax.swing.*; |
---|
5 | import java.awt.*; |
---|
6 | |
---|
7 | /** |
---|
8 | * @author Piotr Sniegowski |
---|
9 | */ |
---|
10 | public 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.