当前位置: 技术问答>java相关
这段程序有什么问题呀?
来源: 互联网 发布时间:2017-04-11
本文导语: import java.awt.*; import java.awt.event.*; import javax.swing.*; class MbPanel extends JPanel implements ActionListener { Color[] Colors = {Color.black,Color.red,Color.green,Color.blue,Color.magenta,Color.yellow,Color.orange,Color.pink}; JPanel b[] = new JPanel[16]; ...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class MbPanel extends JPanel
implements ActionListener
{
Color[] Colors = {Color.black,Color.red,Color.green,Color.blue,Color.magenta,Color.yellow,Color.orange,Color.pink};
JPanel b[] = new JPanel[16];
JLabel JjInfo = new JLabel("ok");
public MbPanel()
{
this.setLayout(new BorderLayout());
JPanel p1 = new JPanel(new GridLayout(2, 1));
p1.add(JjInfo);
JPanel p2 = new JPanel(new GridLayout(1, 16));
p1.add(p2);
for (int i = 0; i
import java.awt.event.*;
import javax.swing.*;
class MbPanel extends JPanel
implements ActionListener
{
Color[] Colors = {Color.black,Color.red,Color.green,Color.blue,Color.magenta,Color.yellow,Color.orange,Color.pink};
JPanel b[] = new JPanel[16];
JLabel JjInfo = new JLabel("ok");
public MbPanel()
{
this.setLayout(new BorderLayout());
JPanel p1 = new JPanel(new GridLayout(2, 1));
p1.add(JjInfo);
JPanel p2 = new JPanel(new GridLayout(1, 16));
p1.add(p2);
for (int i = 0; i