📄 result_screen.java
字号:
/**
* Basic packages used by various classes..
*
*/
import com.sun.kjava.*;
/**
* Decalaring a class result_screen which is responsible for
* showing the results in the ScrollTextBox
*/
public class result_screen extends Spotlet
{
/**
* Declaring the GUI components
*
*/
Button exit = new Button("Exit", 80,145);
ScrollTextBox result_box;
result_screen(String result)
{
/**
* Getting the Graphics and redrawing the screen.
*
*/
Graphics graphics = Graphics.getGraphics();
graphics.resetDrawRegion();
graphics.clearScreen();
/**
* Painting the title on the screen.,
*
*/
graphics.drawString("Result of parsing",25,2);
/**
* Registering the Spotlet and painting the GUI components.
*
*/
result_box = new ScrollTextBox(result,10,20,120,120);
exit.paint();
result_box.paint();
register(NO_EVENT_OPTIONS);
}
public void penDown(int x, int y)
{
/**
* Exit the program
*
*/
if (exit.pressed(x,y))
{
System.exit(0);
}
else if (result_box.contains(x,y))
result_box.handlePenMove(x,y);
}
public void penMove(int x, int y)
{
if (result_box.contains(x,y))
result_box.handlePenMove(x,y);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -