Back to project page Stickman.
The source code is released under:
Apache License
If you think the Android project Stickman listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.wireframe.stickman.editor; import java.awt.TextField; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Scanner; /*from w w w. j a va 2 s .c om*/ import javax.swing.JPanel; public class SizingPanel extends JPanel implements ActionListener{ private MappingPanel mp; private TextField width; private TextField height; public SizingPanel(MappingPanel mp) { this.mp = mp; width = new TextField("50"); width.addActionListener(this); add(width); height = new TextField("50"); height.addActionListener(this); add(height); } @Override public void actionPerformed(ActionEvent arg0) { String wString = width.getText().replaceAll("\\D", ""); String hString = height.getText().replaceAll("\\D", ""); int w = Integer.parseInt(wString); int h = Integer.parseInt(hString); mp.setTileDimension(w,h); } }