Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30531

Jbutton and JLabel

Newsgroups comp.lang.java.programmer
Date 2014-12-09 09:52 -0800
Message-ID <cec907d9-e353-47a2-9684-5255e437dd1b@googlegroups.com> (permalink)
Subject Jbutton and JLabel
From colmjkav@gmail.com

Show all headers | View raw


for some reason the following does not compile. Compiker complains that "the method JLabel is undefined for QuizCardBuilder". How come this is happening? I see the method in javax.swing.*.


import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;

public class QuizCardBuilder {

	private JTextArea question;
	
	public void main(String[] args) {
		QuizCardBuilder qbuilder = new QuizCardBuilder();
		qbuilder.go();
	}
	
	public void go() {

            JLabel qLabel = JLabel("Question:");
        }
}

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Jbutton and JLabel colmjkav@gmail.com - 2014-12-09 09:52 -0800
  Re: Jbutton and JLabel Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-12-09 12:53 -0500
    Re: Jbutton and JLabel colmjkav@gmail.com - 2014-12-09 10:31 -0800
      Re: Jbutton and JLabel Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-12-09 13:56 -0500

csiph-web