글
JAVA
프로그래밍
2009. 4. 23. 12:20
import org.kwis.msp.lcdui.*;
public class LineEx extends Jlet
{
protected void startApp(String args[])
{
Display dp = Display.getDefaultDisplay();
LineClass card = new LineClass();
dp.pushCard(card);
}
protected void destroyApp(boolean b){}
}
class LineClass extends Card
{
protected void paint(Graphics g)
{
g.setColor(0xffffff);
//사각형 그리기
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(0, 0, 0); //RGB 값으로 설정
//Line style 설정
g.setStrokeStyle(Graphics.SOLID);
//Line 그리기
g.drawLine(0, 0, getWidth(), getHeight());
g.setStrokeStyle(Graphics.DOTTED);
g.drawLine(getWidth(), 0, 0, getHeight());
}
}