2 qq 34727409 qq_34727409 于 2016.05.02 21:52 提问

Manage m=new Manage();提示 Multiple markers at this line,Manage can not be resolved to a type,

package com.test;import java.awt.Dimension;import java.awt.Toolkit;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.io.IOException;import javax.swing.ButtonGroup;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.JPasswordField;import javax.swing.JRadioButton;import javax.swing.JTextField;/** * 教 师: * 账号:143821 * 密码:143821 * * 管理员: * 账号:14 * 密码:123 * * 学 生: * 账号:学号 * 密码:学号 */public class Login extends JFrame { public static void main(String[] args) { // TODO Auto-generated method stub final boolean[] rb=new boolean[3]; final String userName = "abc"; final String passwrod = "123"; JFrame jFrame = new JFrame("教务管理系统--登陆界面");// jFrame.setSize(1000,1000); Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); jFrame.setBounds(((int)dimension.getWidth() - 200) / 2, ((int)dimension.getHeight() - 300) / 2, 220, 180); //去掉最大化 jFrame.setResizable(false); jFrame.setLayout(null); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel label1 = new JLabel("账号"); label1.setBounds(10, 10, 100, 30); jFrame.add(label1); JLabel label2 = new JLabel("密码"); label2.setBounds(10, 40, 100, 30); jFrame.add(label2); final JTextField text1 = new JTextField(); text1.setBounds(50, 15, 150, 20); jFrame.add(text1); final JPasswordField text2 = new JPasswordField(); text2.setBounds(50, 45, 150, 20); jFrame.add(text2); JRadioButton rb1=new JRadioButton("管理员"); JRadioButton rb2=new JRadioButton("老师"); JRadioButton rb3=new JRadioButton("学生"); JPanel jp=new JPanel(); jp.add(rb1); jp.add(rb2); jp.add(rb3); jp.setBounds(0, 75, 220, 40); jFrame.add(jp); ButtonGroup group = new ButtonGroup();// 创建单选按钮组 group.add(rb1);// 将radioButton1增加到单选按钮组中 group.add(rb2);// 将radioButton2增加到单选按钮组中 group.add(rb3);// 将radioButton3增加到单选按钮组中 rb1.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub if("14".equals(text1.getText())&&"123".equals(text2.getText())) rb[0]=true; } }); rb2.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub if("143821".equals(text1.getText())&&"143821".equals(text2.getText())) rb[1]=true; }

2个回答

CSDNXIAOC
CSDNXIAOC   2016.05.02 22:01


be useful  (know your role)
 
understand your boss (priority, working style)
 
Visibility ( The best way is get possitive feedback from other teams)
 
Streatch yourself
 
build good relationship with peers
答案就在这里:how to manage upwards
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

devmiao
devmiao   Ds   Rxr 2016.05.02 23:53
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!