日期:2014-05-20 浏览次数:20862 次
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.ScrollPaneLayout;
import com.withiter.util.ResolutionUtils;
public class Main extends JFrame {
private static final long serialVersionUID = 3350060192892360223L;
class Resolution {
private String name;
private String value;
public Resolution(String name, String value) {
super();
this.name = name;
this.value = value;
}
public String toString(){
return name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
class Template {
private Resolution resolution;
private int areas;
public Template(Resolution resolution, int areas) {
super();
this.resolution = resolution;
this.areas = areas;
}
public Template(int areas){
super();
this.areas = areas;
}
public Resolution getResolution() {
return resolution;
}
public void setResolution(Resolution resolution) {
this.resolution = resolution;
}
public int getAreas() {
return areas;
}
public void setAreas(int areas) {
this.areas = areas;
}
@Override
public String toString() {
if(areas == 0){
return "请选择模板区域数目";
}
return "区域数目:"+areas;
}
}
private JLabel resolutionLabel;
private JLabel templateLabel;
private JComboBox jcbresolution;
private JComboBox jcbTemplate;
private JScrollPane designScrollPanel;
private JPanel designPanel;
private JLabel test1 = new JLabel("asdfkjashdkghasdlkjghalskjdghlakjshdglk");
private JLabel test2 = new JLabel("asdfkjashdkghasdlkjghalskjdghlakjshdglk");
private JLabel test3 = new JLabel("asdfkjashdkghasdlkjghalskjdghlakjshdglk");
private JLabel test4 = new JLabel("asdfkjashdkghasdlkjghalskjdghlakjshdglk");
private JLabel test5 = new JLabel("asdfkjashdkghasdlkjghalskjdghlakjshdglk");