我无法找到我的程序中的错误。我刚刚进入此任何帮助将不胜感激。我有错误,我不知道如何解决。我的全代码如下:编译时间错误:无法找到符号Jlabel
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class SampleApp3 extends JFrame{
Container pane;
JLabel label1;
JLabel label2;
Jlabel label3;
Jlabel label4;
public SampleApp3(){
pane=getContentPane();
setSize(650, 540);
setTitle("FormExample");
pane.setLayout(null);
label1= new JLabel("STI College Las Pinas",SwingConstants.CENTER);
label1.setBackground(Color.yellow);
label1.setToolTipText("Pogi Ako");
label1.setForeground(Color.blue);
pane.setBackground(Color.yellow);
label1.setBounds(100,210,325,50);
pane.add(label1,"Center");
label2= new JLabel("Charles Jason Decena",SwingConstants.CENTER);
label2.setBackground(Color.yellow);
label2.setToolTipText("Si Charles ay Pogi");
label2.setForeground(Color.blue);
pane.setBackground(Color.yellow);
label2.setBounds(110,215,320,48);
pane.add(label2,"Center");
label3= new JLabel("BSIT-124",SwingConstants.CENTER);
label3.setBackground(Color.yellow);
label3.setToolTipText("Ehem si Decena ay pogi");
label3.setForeground(Color.blue);
pane.setBackground(Color.yellow);
label3.setBounds(120,220,315,46);
pane.add(label3,"Center");
label4= new JLabel("Computer Programming 2",SwingConstants.CENTER);
label4.setBackground(Color.yellow);
label4.setToolTipText("Well Pogi talaga ako");
label4.setForeground(Color.blue);
pane.setBackground(Color.yellow);
label4.setBounds(130,225,315,44);
pane.add(label4,"Center");
}
public static void main(String args[]) {
SampleApp3= new SampleApp3(); //and this one
app.setVisible(true);
}
}
该错误消息说,Jlabel
3,4“无法找到符号”,也包含文本sampleapp3。任何人都可以帮助我什么导致错误?
这是'JLabel',而不是'Jlabel' – Ian2thedv 2015-02-10 15:52:45
不知道是否属于http://codereview.stackexchange.com? – JensG 2015-02-10 15:54:22
海事组织我不会downvote那。 – 2015-02-10 15:55:14