错误内容如下The selected wizard could not be started.
Plug-in org.eclipse.wb.swing was unable to load class org.eclipse.wb.internal.swing.wizards.application.NewSwingApplicationWizard.
An error occurred while automatically activating bundle org.eclipse.wb.swing (482).
windowbuilder新建项目时出现错误,求各位大神指点迷津
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答
- 无明之徒 2018-08-28 09:42关注
package swing;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JPasswordField;import java.awt.SystemColor;
import javax.swing.JButton;
import javax.swing.LayoutStyle.ComponentPlacement;import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;public class LogIn {
private JFrame frame; private JTextField textField; private JPasswordField passwordField; /*adminclass a1 = new adminclass("123", 666666); salerclass s1 = new salerclass(001, 666666, 0, 0); salerclass s2 = new salerclass(002, 666666, 0, 0); salerclass s3 = new salerclass(003, 666666, 0, 0); salerclass s4 = new salerclass(004, 666666, 0, 0); salerclass s5 = new salerclass(005, 666666, 0, 0);*/ /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { LogIn window = new LogIn(); window.frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the application. */ public LogIn() { initialize(); } /** * Initialize the contents of the frame. */ private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 450, 300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JTextArea textArea = new JTextArea(); textArea.setFont(new Font("新宋体", Font.BOLD, 18)); textArea.setBackground(SystemColor.control); textArea.setText("\u82F9\u679C\u9500\u552E\u7BA1\u7406\u8F6F\u4EF6"); JTextArea textArea_1 = new JTextArea(); textArea_1.setFont(new Font("新宋体", Font.PLAIN, 13)); textArea_1.setBackground(SystemColor.control); textArea_1.setText("\u7528\u6237\u540D\uFF1A"); JTextArea textArea_2 = new JTextArea(); textArea_2.setFont(new Font("新宋体", Font.PLAIN, 13)); textArea_2.setBackground(SystemColor.control); textArea_2.setText("\u5BC6\u7801\uFF1A"); textField = new JTextField(); textField.setColumns(10); passwordField = new JPasswordField(); JButton button = new JButton("\u767B\u5F55"); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { System.out.println("chenggong"); admin ai = new admin(); frame.dispose();//看这里,一点建议,建议你还是手写,看API,这个生成的真心不怎么好,还有建议把frame封装构造方法中 } }); JButton button_1 = new JButton("\u6E05\u7A7A"); button_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { textField.setText(null); passwordField.setText(null); } }); GroupLayout groupLayout = new GroupLayout(frame.getContentPane()); groupLayout .setHorizontalGroup(groupLayout .createParallelGroup(Alignment.LEADING) .addGroup( groupLayout .createSequentialGroup() .addGroup( groupLayout .createParallelGroup( Alignment.LEADING) .addGroup( groupLayout .createSequentialGroup() .addGap(114) .addComponent( textArea, GroupLayout.PREFERRED_SIZE, 186, GroupLayout.PREFERRED_SIZE)) .addGroup( groupLayout .createSequentialGroup() .addGap(57) .addGroup( groupLayout .createParallelGroup( Alignment.TRAILING, false) .addComponent( textArea_2, Alignment.LEADING) .addComponent( textArea_1, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)) .addGap(53) .addGroup( groupLayout .createParallelGroup( Alignment.LEADING) .addComponent( passwordField, GroupLayout.PREFERRED_SIZE, 112, GroupLayout.PREFERRED_SIZE) .addComponent( textField))) .addGroup( Alignment.TRAILING, groupLayout .createSequentialGroup() .addContainerGap() .addComponent( button) .addGap(18) .addComponent( button_1))) .addContainerGap(130, Short.MAX_VALUE))); groupLayout .setVerticalGroup(groupLayout .createParallelGroup(Alignment.LEADING) .addGroup( groupLayout .createSequentialGroup() .addGap(31) .addComponent(textArea, GroupLayout.PREFERRED_SIZE, 31, GroupLayout.PREFERRED_SIZE) .addGap(18) .addGroup( groupLayout .createParallelGroup( Alignment.BASELINE) .addComponent( textArea_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent( textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGap(33) .addGroup( groupLayout .createParallelGroup( Alignment.BASELINE) .addComponent( textArea_2, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE) .addComponent( passwordField, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)) .addGap(18) .addGroup( groupLayout .createParallelGroup( Alignment.BASELINE) .addComponent(button_1) .addComponent(button)) .addContainerGap(45, Short.MAX_VALUE))); frame.getContentPane().setLayout(groupLayout); }
}
解决 无用评论 打赏 举报
悬赏问题
- ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
- ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
- ¥20 有关区间dp的问题求解
- ¥15 多电路系统共用电源的串扰问题
- ¥15 slam rangenet++配置
- ¥15 有没有研究水声通信方面的帮我改俩matlab代码
- ¥15 ubuntu子系统密码忘记
- ¥15 保护模式-系统加载-段寄存器
- ¥15 电脑桌面设定一个区域禁止鼠标操作
- ¥15 求NPF226060磁芯的详细资料