public MotionPanel( final Motion2DPanel myJP, int width, int height ) {
this.width = width;
this.height = height;
this.myJP = myJP;
motionOn = false;
setBackground( Color.orange );
constAIRadBtn = new JRadioButton( Motion2DResources.getString( "MotionPanel.LinearAccIRadioButton" ), false );
constAIIRadBtn = new JRadioButton( Motion2DResources.getString( "MotionPanel.LinearAccIIRadioButton" ), false );
sHMRadBtn = new JRadioButton( Motion2DResources.getString( "MotionPanel.SimpleHarmonicRadioButton" ), false );
circularRadBtn = new JRadioButton( Motion2DResources.getString( "MotionPanel.CircularRadioButton" ), false );
stopRadBtn = new JRadioButton( Motion2DResources.getString( "MotionPanel.StopRadioButton" ), true );
constAIRadBtn.setBackground( Color.orange );
constAIIRadBtn.setBackground( Color.orange );
sHMRadBtn.setBackground( Color.orange );
circularRadBtn.setBackground( Color.orange );
stopRadBtn.setBackground( Color.orange );
amplitude = 175;
myJP.addComponentListener( new ComponentAdapter() {
public void componentResized( ComponentEvent e ) {
MotionPanel.this.width = myJP.getWidth();
MotionPanel.this.height = myJP.getHeight();
}
} );
}
MotionPanel.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:PhET
作者:
评论列表
文章目录