Jbutton Help!!Pls do help if know

i have a program that can;t compile because it stated canot resolve the button symbol,just got one error!!can anyone help see why the problem appear and how to fix it.Just cut and paste to compile(urgent)
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
public class bb extends JFrame implements ActionListener{
     public bb() {
          super("Software License Agreement");
          Container contentPane = getContentPane();
          JPanel panel = new JPanel();
          JCheckBox agree = new JCheckBox("I agree with all the term above");
          final JButton
               accept = new JButton("Accept..."),          
               decline = new JButton("Decline...");
               accept.setEnabled(false);          
               accept.setMnemonic('A');
               decline.setEnabled(false);
               decline.setMnemonic('D');
               decline.addActionListener(this);
          String content = "testing" ;
          JLabel label = new JLabel("Important Notice!Please read this license agreement carefully before proceeding to the next page otherwise utilizing this product indicate your"),
          label2 = new JLabel("acknowledgement that you have already read the entire content agreement and agree all of its term.Scroll down to continue read below the page.");
                                   label.setFont(new Font("Arial", Font.PLAIN, 12));
                    label.setForeground(Color.darkGray);
                    label2.setForeground(Color.darkGray);
                    label2.setFont(new Font("Arial", Font.PLAIN, 12));
          JTextArea word= new JTextArea(content,23,68);
          word.setLineWrap(true);
          panel.add(new JScrollPane(word));
          panel.add(agree);
          agree.setSelected(false);
          word.setEditable(false);
          panel.setPreferredSize(new Dimension(785,470));
          panel.setBorder(BorderFactory.createTitledBorder("Contract"));
          contentPane.setLayout(new FlowLayout());
          contentPane.add(label, BorderLayout.NORTH);
          contentPane.add(label2);
          contentPane.add(panel);
          contentPane.add(accept,"Left");
          contentPane.add(decline,"Left");
          agree.addItemListener(new ItemListener() {
               public void itemStateChanged(ItemEvent event) {
                    JCheckBox b = (JCheckBox)event.getSource();
                    accept.setEnabled(b.isSelected());
                    decline.setEnabled(b.isSelected());
                    //button.repaint();
     public void QuitScreen() {
     bb BB = new bb();
     programquit pQuit = new programquit(BB);
     pQuit.setVisible(true);
public static void main(String args[]) {
          JFrame f = new bb();
          Toolkit theKit = f.getToolkit();
          Dimension wndSize = theKit.getScreenSize();
          f.setBounds(wndSize.width/10, wndSize.height/10,800,600);
          f.setVisible(true);
     f.setResizable(false);
f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
     public void actionPerformed(ActionEvent e){
          if(e.getSource() == decline)
QuitScreen();

eg
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
class programquit extends Dialog /*implements ActionListener*/ {
    Label
    lConfirm = new Label("Are you sure ?");
    Button
    bYes = new Button("Yes"),
     bNo = new Button("No");
    Panel
    p1 = new Panel(),
     p2 = new Panel();
    public programquit(Frame owner) {
     this(owner, true);
    public programquit(Frame owner, boolean model) {
     super(owner, model);
     setTitle("Quiting EMS");
     setResizable(false);
     setSize(200, 150);
     setLocation(300, 200);
     setBackground(Color.black);
     setForeground(Color.green);
     addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
              setVisible(false);
     setLayout(new GridLayout(2, 1));
     p1.add(lConfirm);
     p2.add(bYes);
     p2.add(bNo);
     add(p1);
     add(p2);
     bYes.setBackground(Color.green);
     bYes.setForeground(Color.black);
     bNo.setBackground(Color.green);
     bNo.setForeground(Color.black);
     bYes.addActionListener( new ActionListener() {
          public void actionPerformed(ActionEvent e) {
              System.exit(0);
     bNo.addActionListener( new ActionListener() {
          public void actionPerformed(ActionEvent e) {
              setVisible(false);
public class bb extends JFrame /*implements ActionListener*/ {
    public bb() {
     super("Software License Agreement");
     Container contentPane = getContentPane();
     JPanel panel = new JPanel();
     JCheckBox agree = new JCheckBox("I agree with all the term above");
     final JButton
         accept = new JButton("Accept..."),
         decline = new JButton("Decline...");
     accept.setEnabled(false);
     accept.setMnemonic('A');
     decline.setEnabled(false);
     decline.setMnemonic('D');
     decline.addActionListener( new ActionListener() {
          public void actionPerformed(ActionEvent e){
              QuitScreen();
     String content = "testing" ;
     JLabel label = new JLabel("Important Notice!Please read this license agreement carefully before proceeding to the next page otherwise utilizing this product indicate your"),
         label2 = new JLabel("acknowledgement that you have already read the entire content agreement and agree all of its term.Scroll down to continue read below the page.");
     label.setFont(new Font("Arial", Font.PLAIN, 12));
     label.setForeground(Color.darkGray);
     label2.setForeground(Color.darkGray);
     label2.setFont(new Font("Arial", Font.PLAIN, 12));
     JTextArea word= new JTextArea(content,23,68);
     word.setLineWrap(true);
     panel.add(new JScrollPane(word));
     panel.add(agree);
     agree.setSelected(false);
     word.setEditable(false);
     panel.setPreferredSize(new Dimension(785,470));
     panel.setBorder(BorderFactory.createTitledBorder("Contract"));
     contentPane.setLayout(new FlowLayout());
     contentPane.add(label, BorderLayout.NORTH);
     contentPane.add(label2);
     contentPane.add(panel);
     contentPane.add(accept,"Left");
     contentPane.add(decline,"Left");
     agree.addItemListener(new ItemListener() {
          public void itemStateChanged(ItemEvent event) {
              JCheckBox b = (JCheckBox)event.getSource();
              accept.setEnabled(b.isSelected());
              decline.setEnabled(b.isSelected());
//button.repaint();
    public void QuitScreen() {
     bb BB = new bb();
     programquit pQuit = new programquit(BB);
     pQuit.setVisible(true);
    public static void main(String args[]) {
     JFrame f = new bb();
     Toolkit theKit = f.getToolkit();
     Dimension wndSize = theKit.getScreenSize();
     f.setBounds(wndSize.width/10, wndSize.height/10,800,600);
     f.setVisible(true);
     f.setResizable(false);
     f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
}

Similar Messages

  • Saving Illustrator file as PDF/ chops off top and bottom help pls

    I have some business brochures that I created in Adobe Illustrator
    I am tying to save one as a PDF however when I do the save it chops off the top and bottom of the page
    Help Pls  

    More help please another brochure I have created with illustrator When I try and save this file to as a PDF  after it save the PDF all I can see is a thin strip and in the 5% zoom box it shows a huge number 5166  thx

  • Again same problem error 0xE8000003 pls help again i don't know it keep doing that

    Again same problem error 0xE8000003 pls help again i don't know it keep doing that please help with that

    Hello sartip fatah,
    The following article provides further information regarding this error, and steps to help resolve it.
    iOS: Unknown error containing '0xE' when connecting to a Windows PC
    http://support.apple.com/kb/TS3221
    Cheers,
    Allen

  • After installing new OS i can't type a login and password because the font is not supported. DO NOT KNOW WHAT TO DO!!!!HELP PLS?!

    after installing new OS i can't type a login and password because the font is not supported. DO NOT KNOW WHAT TO DO!!!!HELP PLS?!

    Hello Pete from another old guy,
    It sounds like you have an older iMac than the 2006 and newer model this forum covers. The problem is that, in 2006, Apple changed from PowerPC to Intel processors and third-party developers soon stopped making new software for the older processors. That's why you cannot upgrade Flash player--the current version requires a Mac the "2006 and later" processor.
    However, not having a current version of FlashPlayer should not affect your ability to download. If you try downloading, do you get an error message or does something else happen?
    Do you have another web browser like FireFox or Camino on your computer?
    but would love to get my MAC back up to date and running right.
    Well, "running right" may be doable but "up to date" may not be. You are already at as high a Mac OS level that a pre-2006 Mac can use.  We need to pin down your variant to make recommendations. From your Apple menu at the left end of the menu bar, do "About this Mac":
    That brings up this window:
    Let us know what yours say for "processor." The two choices are "PowerPC" as in the example, or "Intel." If you  have an Intel processor, you have more options available.
    Awaiting your report,
    Allan

  • Since updating to mountain lion i-movie reports not enough memory to send video to  Idvd,I know there is ample memory as i have the full amount of memory installed and it is all working,help pls

    Since updating to mountain lion,Imovie reports theres not enough memory to export to Idvd,I know this is not correct as i hve the maximum amount of memory installed and it is all working,i had no such problems when using Snow leopard,help pls.

    Since updating to mountain lion,Imovie reports theres not enough memory to export to Idvd,I know this is not correct as i hve the maximum amount of memory installed and it is all working,i had no such problems when using Snow leopard,help pls.

  • How to create matrix template help pls

    hi frs,
    i have generated xml file after creating matrix report in report builder.
    i want to know how to create matrix template(rtf) in word document.
    if i use wizard or insert> all fields i am not getting rtf like matrix.
    help pls
    Thanks
    Rajesh

    This issue is really becoming a problem for us. Does anyone have any examples of label templates. The label when generated automatically converts from pontrait to landscape. If you increase the size of the template then word complains about the page and margin size before printing.
    Anyone have any ideas?
    Thanks

  • "Adobe Illustrator cs5 quit unexpectedly" error message. After I upgratded my imac to Mavericks I can't open Illustrater CS5. Help pls.

    "Adobe Illustrator cs5 quit unexpectedly" error message.
    After I upgrated my imac from Snow Leopard to Mavericks I can't open Illustrator CS5. (No problem with PS)
    Every opening attemp crashes. May this be possible because of third party plug-ins. (eg. Esko Artwork)
    Help pls.
    Thank you.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
    SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the name of the crashed application or process. For example, if iTunes crashed, you would enter "iTunes" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, select
    DIAGNOSTIC AND USAGE INFORMATION ▹ User Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of crash reports. The name of each report starts with the name of the process, and ends with ".crash". Select the most recent report related to the process in question. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    ☞ If you don't see any reports listed, but you know there was a crash, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    ☞ Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • Updated to ios7.0.4 phone crashed and now not recognized by itunes help pls

    someone pls help me i just dont know what to do?

    Everything will be erased, unless you copied yoru itunes media library to your new computer.
    Sorry No, downgrading isn't supported by Apple.

  • Can i use digi prepaid with iphone4 or do i have to get a postpaid help pls, can i use digi prepaid with iphone4 or do i have to get a postpaid help pls

    can i use digi prepaid with iphone4 or do i have to get a postpaid help pls, can i use digi prepaid with iphone4 or do i have to get a postpaid help pls

    I don't know if you can legally download a full Windows 7 installer, but if you can find one, you just need to copy the image to a flash drive. See:
    http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.7.pdf
    and
    https://discussions.apple.com/thread/4087200?start=0&tstart=0
    Amazon has several different versions of Windows 7 available on disk, though. Have you tried them?
    Regards.

  • Building volume control.... GGRRR help pls!

    ,Building volume control.... GGRRR help pls!? I have lost the volume control for my Creative Inspire 5.1 speakers.
    Now i down want to spend like 20 on a new one so i thought about building a make sift one.
    ok starting at the top going clock wise for pin numbers.
    when i connect up pins 2 456 the speakers will come on at full volume but for the life of me i cannot figure out how the volume control came in to it.
    I am assuming that you just whack a pot on it somewhere. spent all day trying to figure this but it is iluding me and starting to wind me up as i dont think it shouldnt be that hard to figure it out.
    Also i know a lot of people who have had this prob but no answers have been figured from the 3 nights searching the web for a pin out or circuit diagram of the actual control unit,
    If any one has a picture of one or even a circuit diagram of the volume control unit please email them to me at [email protected]
    Oh and creative... I dont want to sell it or make any money i just want the speaker system working again.
    Thanks guys / Girls
    James

    The digital output was triggered some how. Use a toothpick and feel around to unclick it. Its around the 3 oclock position.
    If you feel uncomfortable doing that you can try inserting and removing a headphone jack till the light goes away.
    Basically there is a switch in the jack that either tells the computer to send out "regular" audio or "digital" audio and yours seems to be stuck in digital mode.

  • Help pls i cant use the secondary camera of my nok...

    pls help me i cant use the secondary camera of my nokia n96.. i dont what happened pls help...just when i updated in 20.050 and when i use the secondary camera it says " unexpected error occured."  help pls what will i do?

    first of all, remove your battery and leave it out for five minutes then replace it. see if this solves the problem. if it does not, backp all your data to memory card or the mass storage (16gb) in the phone, or as a backup file .nbu in Nokia PC Suite. then perform a hard reset (*#7370 and *#7780#) to clear the phone to default factory settings. if this still does not work, then try the three-finger hard reset. if this still does not work, you will have to take your phone to your local Nokia Care Centre for them to look at.
    remember to do appropriate backup of all your files first. let us know how it goes.
    If you found this or someone's comments helpful or like what that person has to say, please give some Kudos to their post!

  • HELP PLS! reprogram voicemail key (1) in nokia 880...

    HELP PLS!
    I need to reprogram the voicemail key (=1) in a nokia arte 8800 and dont know how!
    In the user manual it tells you to go to messaging... and there to voice messages... it looks easy and simple BUT this phone doesnt have that option in messaging... no "voice messages" in sight at all..!
    So I'm getting nuts and odnt know what else to do.
    Any ideas pls?!
    thanks

    Hmmm...on mine it does have the option, once in messages, then voicemail, under this option, there are only two, one of which is the voice mailbox number, this should be set to the number of your voicemail service (for Vodafone, it's 121).
    Do you not have this option? If not you could program the number as a speed dial which should then do the same.

  • HT1947 I can't pair Remote on my iPhone with iTunes on my MacBook Pro... Help, pls. Thanks!

    I tried everything. But it looks like I haven't really done anything coz nothing worked. I don't know where to start. My iPhone 5 has an updated iOS, my iTunes is also up to date... I can't find the "Look for iPod touch, iPhone and iPad Remotes" in iTunes. At this point, I'm really lost. Help, pls!

    What does this have to do with iTunes for Windows, the forum to which the question was posted?

  • Rocket Raid 2522 - no localhost/7402  so can't login - help pls?

    I havea RR2522 linked to a ProAvio raid drive. It was working fine except my password wasn't letting me into my GUI interface. So I reset it according to Highpoint instructions.
    Now I can't login to either https or https://localhost:7402/ and my Raid Drive has dissappeared.
    I have tried lots of things including RR4322 Driver that someone on an Apple thread suggested.
    Highpoint Customer Service is no existent - and my supplier says - speak to HIghpoint. Last Thursday they took a support request. No answer yet!
    I know it works because it did work. Can anyone help pls I am really stuck?
    Thanks
    Nick

    Thanks for the report!

  • Nokia 5800XM problems, help pls

    hi, my nokia 5800XM got problems like, i can't view the pictures and video clips in the "images and videos" page, and it's same even i updated FW to v50, beside that, right after i updated the FW to v50, all my songs was unable to display on the songs list, but they do exist in the memory card...
    anyone help pls~

    try removing the battery and sim card for approx 5-10 minutes. reinsert sim and battery power it on, if that does not work you will have to take it to nokia care i am afraid. there is nothing else one can try.
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

  • I am transfering my stuff from my lap top to my desk top (both Mac). I cannot get my CS4 to open. It gives me a 150:30 error, licencing thing. I have no idea what to do and after hours of searching none of what I found helps. I don't know anything about t

    Sorry didn't know that the first step was just supposed to be "subject".
    So here it is again.
    "I am transfering my stuff from my lap top to my desk top (both Mac). I cannot get my CS4 to open. It gives me a 150:30 error, licencing thing. I have no idea what to do and after hours of searching none of what I found helps. I don't know anything about this stuff so please don't answer with "maybe this willl work, or maybe that."  I need a real answer please and I cannot find a way to actually contact Adobe. I also don't have a disk drive on this Mac. Thanks"
    Also please feel free to e-mail the answer because I hate looking for these answers online. It takes me forever to find this section. Not that I have even even gotten a real answer.
    [email protected]

    Hi Sonia,
    While transferring Adobe from laptop to PC the licensing files got corrupt and the right way to use Adobe Applications is to install first as transferring from a different machine can give you problems.
    You can try steps from this article if that helps otherwise you have to reinstall and manually delete some files , everything is mentioned.
    http://helpx.adobe.com/x-productkb/global/error-licensing-stopped-mac-os.html
    You can download CS4 from here:
    Download CS4 products

Maybe you are looking for