📄 chap.java
字号:
{
textinput.setFont(new Font("SansSerif",Font.ITALIC,10));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.ITALIC,10));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.ITALIC,10));
}
}
if(choice1.getSelectedIndex()==1&&choice2.getSelectedIndex()==0)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.BOLD,12));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.BOLD,12));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.BOLD,12));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.BOLD,12));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.BOLD,12));
}
}
if(choice1.getSelectedIndex()==1&&choice2.getSelectedIndex()==1)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.PLAIN,12));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.PLAIN,12));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.PLAIN,12));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.PLAIN,12));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.PLAIN,12));
}
}
if(choice1.getSelectedIndex()==1&&choice2.getSelectedIndex()==2)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.ITALIC,12));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.ITALIC,12));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.ITALIC,12));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.ITALIC,12));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.ITALIC,12));
}
}
if(choice1.getSelectedIndex()==2&&choice2.getSelectedIndex()==0)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.BOLD,14));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.BOLD,14));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.BOLD,14));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.BOLD,14));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.BOLD,14));
}
}
if(choice1.getSelectedIndex()==2&&choice2.getSelectedIndex()==1)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.PLAIN,14));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.PLAIN,14));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.PLAIN,14));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.PLAIN,14));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.PLAIN,14));
}
}
if(choice1.getSelectedIndex()==2&&choice2.getSelectedIndex()==2)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.ITALIC,14));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.ITALIC,14));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.ITALIC,14));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.ITALIC,14));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.ITALIC,14));
}
}
if(choice1.getSelectedIndex()==3&&choice2.getSelectedIndex()==0)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.BOLD,18));
textoutput.setFont(new Font("Dialog",Font.BOLD,18));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.BOLD,18));
textoutput.setFont(new Font("DialogInput",Font.BOLD,18));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.BOLD,18));
textoutput.setFont(new Font("SansSerif",Font.BOLD,18));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.BOLD,18));
textoutput.setFont(new Font("Serif",Font.BOLD,18));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.BOLD,18));
textoutput.setFont(new Font("Monospaced",Font.BOLD,18));
}
}
if(choice1.getSelectedIndex()==3&&choice2.getSelectedIndex()==1)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.PLAIN,18));
textoutput.setFont(new Font("Dialog",Font.PLAIN,18));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.PLAIN,18));
textoutput.setFont(new Font("DialogInput",Font.PLAIN,18));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.PLAIN,18));
textoutput.setFont(new Font("SansSerif",Font.PLAIN,18));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.PLAIN,18));
textoutput.setFont(new Font("Serif",Font.PLAIN,18));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.PLAIN,18));
textoutput.setFont(new Font("Monospaced",Font.PLAIN,18));
}
}
if(choice1.getSelectedIndex()==3&&choice2.getSelectedIndex()==2)
{
if(choice3.getSelectedIndex()==0)
{
textinput.setFont(new Font("Dialog",Font.ITALIC,18));
textoutput.setFont(new Font("Dialog",Font.ITALIC,18));
}
if(choice3.getSelectedIndex()==1)
{
textinput.setFont(new Font("DialogInput",Font.ITALIC,18));
textoutput.setFont(new Font("DialogInput",Font.ITALIC,18));
}
if(choice3.getSelectedIndex()==2)
{
textinput.setFont(new Font("SansSerif",Font.ITALIC,18));
textoutput.setFont(new Font("SansSerif",Font.ITALIC,18));
}
if(choice3.getSelectedIndex()==3)
{
textinput.setFont(new Font("Serif",Font.ITALIC,18));
textoutput.setFont(new Font("Serif",Font.ITALIC,18));
}
if(choice3.getSelectedIndex()==4)
{
textinput.setFont(new Font("Monospaced",Font.ITALIC,18));
textoutput.setFont(new Font("Monospaced",Font.ITALIC,18));
}
}
}
}
class mydialog2 extends Dialog implements ActionListener
{
public mydialog2(Frame parent)
{
super(parent,"图片",true);
setLayout(new FlowLayout());
ig=new ImageIcon("6831.gif");
pictrue=new JButton(ig);
pictrue.addActionListener(this);
this.add(pictrue);
add(buttonexit=new Button("退出"));
buttonexit.addActionListener(this);
setSize(150,150);
setVisible(true);
}
public void actionPerformed(ActionEvent me)
{
if(me.getSource()==pictrue)
{
}
if(me.getSource()==buttonexit)
{
dispose();
}
}
}
public void paint(Graphics g)
{
if (paintStage == 0)
{
mPanel.repaint();
lUser.repaint();
tfName.repaint();
lPass.repaint();
pfPass.repaint();
btLogin.repaint();
btReset.repaint();
}
else
{
Image ii = this.createImage(400,450);
Graphics g1 = ii.getGraphics();
g1.setColor(Color.cyan);
g1.fillRect(0, 0,400,450);
buttonpictrue.repaint();
buttonsend.repaint();
buttonexits.repaint();
buttonFont.repaint();
g.drawImage(ii, 0, 0, this);
}
}
public void update(Graphics g)
{
paint(g);
}
}
class Message implements Serializable
{
String m1;
String m2;
}
class DilogMessage implements Serializable
{
String me1;
String me2;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -