/**
* @author Administrator
*
* To change the template for this generated type comment go to
* Window&references&Java&Code Generation&Code and Comments
*/
public class SineTest
{
public static void main(String args[])
{
SineFrame frame = new SineFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}
class SineFrame extends JFrame
{
public SineFrame()
{
setTitle("SineTest";
setSize(300,400);
p = new MyPanel();
Container t = getContentPane();
t.add(p);
}
private MyPanel p;
}
class MyPanel extends JPanel
{
public MyPanel()
{
setSize(1000,1000);
this.setBackground(Color.WHITE);
System.out.println(this.getWidth());
System.out.println(this.getHeight());
}