亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

大神看一下我這個框架怎么錯了

大神看一下我這個框架怎么錯了

慕粉1312236355 2017-04-01 16:18:59
import java.awt.BorderLayout;import java.awt.FlowLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JCheckBox;import javax.swing.JFileChooser;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JPanel;import javax.swing.JTextField;public class where extends JFrame implements ActionListener { JLabel l1,l2; JFileChooser f; JTextField t; JButton b1,b2; JCheckBox c; JPanel p1,p2; where(){ l1=new JLabel("選擇加密文件"); l2=new JLabel("選擇加密/解密算子"); t=new JTextField(10); b1=new JButton("確定"); b1=new JButton("取消"); c=new JCheckBox("覆蓋文件"); f=new JFileChooser(); p1=new JPanel(); p2=new JPanel(); setLayout(new BorderLayout()); add(p1,BorderLayout.CENTER); add(p2,BorderLayout.SOUTH); f.setControlButtonsAreShown(false); p1.add(p1); p1.add(p2); p2.setLayout(new FlowLayout(FlowLayout.LEFT));p2.add(l1); p2.add(l2); p2.add(f); p2.add(t); p2.add(c); this.setSize(300,400); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setResizable(false); this.setVisible(true); setEvent(); }private void setEvent() { // TODO Auto-generated method stub }public static void main(String[] args) { new where();}@Overridepublic void actionPerformed(ActionEvent arg0) { // TODO Auto-generated method stub }}
查看完整描述

1 回答

已采納
?
噼喱啪啦

TA貢獻392條經驗 獲得超170個贊

p1.add(p1); //這句可能是寫錯了. 你自己看看

p1.add(p2);


查看完整回答
反對 回復 2017-04-10
  • 1 回答
  • 0 關注
  • 1247 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號