Help me pls. i so new in this
Pls tell me why this doesn't close the window.
import java.awt.*;
import java.awt.event.*;
class TicTacGui extends Frame {
Button button[];
TicTacGui(){
Frame mainframe = new Frame();
MenuBar mainmenu = new MenuBar();
Menu m1 = new Menu("File");
Panel forButtons= new Panel();
Panel forText= new Panel();
m1.add(new MenuItem("Exit"));
mainmenu.add(m1);
mainframe.add(forButtons, BorderLayout.CENTER);
mainframe.add(forText, BorderLayout.SOUTH);
mainframe.setMenuBar(mainmenu);
forButtons.setLayout(new GridLayout(3,3,1,1));
//adding buttons
button=new Button[9];
for(int i=0;i<9;i++)
button[i] = new Button("Button");
forButtons.add(button);
mainframe.setSize(300,300);
mainframe.setVisible(true);
//Listener for exiting the window
addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent event ) {
System.exit( 0 );
public static void main(String args[]) {
TicTacGui tic = new TicTacGui();
mainframe is not the same thing as your instance of TicTacGui... there is no need for mainframe. What you are doing is adding everything to mainframe, then showing mainframe, and adding the WindowListener to your instance of TicTacGui... instead, get rid of mainframe and use the instance of TicTacGui that you are creating for everything. since TicTacGui extends frame it gets all of the methods in frame. hope that made sense
Similar Messages
-
Help?! i'm new at this! lol
i just got an ipod touch and everytime i go to buy a song it says first time buyer has to answer the security questions and i don't remember them so i was wondering is there a way to reset / change them?
shaes_mom2009 wrote:
i just got an ipod touch ... answer the security questions and i don't remember them so i was wondering is there a way to reset / change them?
1) Apple ID: All about Apple ID security questions
2) See Here... ask to speak with the Account Security Team...
Apple ID: Contacting Apple for help with Apple ID account security
Or Email Here > Apple Support iTunes Store Contact -
Safari help!! I'm new to this iPhone thing
Down loaded 8.1.3 on my iPhone 6 and now when I open safari and click on the browser it doesn't go back to the screen with the search engines and my past search history please help
-
Please Help!! I am New To This!!
Ok...I have a question about the Airport Express.
I have a 2006 Apple iBook with an Airport Card. I am interested in buying a Airport Express for my house, but i would use it in only one room and it would be pluged right below the desk i work on.
So my question:
Is all i need to do is plug in to an outlet the Airport Express and i would have an internet connection on my iBook?
Thanks, i hope ro hear something asap!
~Kyle~An Airport Express device cannot provide an Internet connection by itself. You must have a broadband Internet connection from an ISP.
-
I have an existing ipod that I use with my mac. I am trying to connect an additional ipod to it but when I try and register, it just brings up the existing info. I don't want to lose the original info or library - just create new for this device. Pls help...
We are starting from the beginning like its a new ipod starts out asking language, country,location services,choose a network,and when we get to "setup ipod touch " there are 3 options 1..setup as new ipod, 2.restore from ipod backup 3 restore from itunes backup and when we hit setup as new ipod and click next it comes up with sign in with apple id or create a free apple id we clicked create a free apple id....then comes up with bday,1st name last name, use your current email address, get a free icloud email address or change email address and THIS is where we have problems....if we hit change email address it means that sis's stuff goes under his name and moves all her stuff to this older ipod which the brother does not want. sorry this is so long but its the only way I knew to do it.
-
My right ear headphones won’t work on my iphone 4s. I restored the iphone and set-up as new phone, this made the right ear headphone work fine. But as soon as I restored the iphone from back-up it stopped working. Pls help
Restore as New...
Redownload your Purchased and Free Apps using the Apple ID you Originally used...
iPhone User Guide
http://manuals.info.apple.com/en_US/iphone_user_guide.pdf -
I have a problem while typing in my MacBook pro. it is showing different characters when i type. for example: qw`e§r]t[y= this is how when we type "qwerty|" can anyone help me pls?
You could just try changing your Input Sources under System Preferences>Language & Text:
But I kind of doubt that's going to work. It may be a hardware problem or a system problem. If you take it into Apple they might be able to determine which and might advise a reinstallation of System software. I would take it to an Apple Store or an AASP but, first, make sure that you have a backup just in case they suggest a clean install of the system.
Good luck,
Clinton -
I created one apple I'd when I started using the iPad. After some days, I had to create a new apple id
as there was some problem with the first one. Now at some places still my old apple Id is appearing. Pls adv how I change this to my new apple Id.Anything you downloaded with the first Apple Id will forever be tied to it, and will always require it to update.
The question here is, why did you think you needed to create a new Apple ID? What was the problem with the first one?
To get rid of th old one, you'll need to delete everything you downloaded with it, and then sign out of the ID in several places around the iPad.
Go to Settings->iTunes & App Stores->Apple ID->Sign out.
Repeat the process, for Facetime, Messages, Mail and any other App you need to sign out of. -
My mini died. bought one used from a friend... all of my songs and books are on my iPhone, and I cant figure out how to get them onto this new computer. this is frustrating. the things i really want are purchases I've made from itunes store... help
!!!!!Hey kevyg3,
I was able to find an article that I believe will help you move your iTunes purchases from your iPhone over to your new computer:
iTunes Store: Transferring purchases from your iOS device or iPod to a computer
http://support.apple.com/kb/HT1848
Hope this helps,
David -
Hi, I'm new at this but I am hoping someone can help me.I have recently been away for 5 weeks and my Tom Tom required updating.When I clicked to update it, it required a pc. As I didn't have access to a pc it wouldn't work is there any way to do this without a pc? I was without this app for 3 weeks! Thanks, Lea
The process to update your Tom Tom is a big data file, you will need to be connected to a Wi-Fi network for it to download. If will take about an hour.
-
Help required with Photoshop Elements 4.0 this has been installed on my new Toshiba laptop with windows 8.1 for some 18 months and operating well. Now it will not open, message pops up saying “attempt to access invalid address” then “application not responding” Suggestions how to access would be much appreciated. Tks. Stuart
What is the size of your hard disk? PSE 4 is a very old program and I suspect it is not able to access the entire hard disk on your machine. Just a thought here.
-
Hi, I am new to this support site so forgive me if I am doing it wrong but I have a problem that I am at a loss as what to do. My (very) old mac 10.2.8 won't switch on..I really only use it for music , there is a vast amount of music stored in it and am heartbroken that it won't even switch on. I have no idea where to start on trying to fix it. Can somebody please help me on where to start on fixing it
You might want to try resetting its power management unit; see the following tech notes:
http://support.apple.com/kb/HT1895
http://support.apple.com/kb/HT1379
The reason I'm suggesting this is that some startup settings are stored and preserved by a tiny battery that lasts about 5 years, inside the computer. When that battery dies, the computer may forget things like what time it is and which disk to start up from. If your Mac is around 5 years old or more, that little battery might be on its way out.
If you can't revive the Mac, don't panic. You can remove its internal hard drive and put it inside a USB/FireWire enclosure so that it can be hooked up to another Mac, and then you can use or copy all of the files and music off of it (assuming the startup problem has nothing to do with the hard drive). -
Hi All. I am new to this forum but hoping I can find some answers from some of you apple guru's out there. I have downloaded a mvie onto my iphone (which took forevere but I cannot find it to view it.Please help
It should be in the Videos App - if it's not in there then have you got a film age rating set in Settings > General > Resttrictions that is hiding it ?
-
I just got a new iPhone 4S . I would like to change my ringtone to an Alan Jackson song . I already download i Tunes . but i don't know how to do it . i'm very new to this and would like to know if someone can help me with this ? Thanks
Your past purchases are not on the computer. By choosing download all, those purchases will download to the computer.
Once authorized to your iTunes account you can control the computer.
When syncing the iPad the first time you will get the warning " this iPad is synced with another computer, syncing will erase all contents and replace with the contents of this computer"
Say yes, this is what you wan to do. -
Hi This is gina salinas. I need help. I bought a new galaxys 5 two days ago... I had Iphone 4 for three years. And now that when I text family and friends with the new phone they receive it and replied back and I did not get their messages. I called att store.. they said for me to call you to unregister my phone numbe related to Apple.
iMesssage to old phone
If you move to another phone and forget to turn off iMessage then read “if you no longer have the device in http://support.apple.com/kb/HT5661 If you still cannot resolve it call Apple http://support.apple.com/kb/HE57
To deactivate iMessage http://support.apple.com/kb/ts5185
Read http://m.samsung.com/us/support/SupportOwnersFAQPopup.do?faq_id=FAQ00053450&fm_s eq=62995 -
I’m new to Aperture and neglected to mark RAW+JPEG pairs when I imported (from iPhoto). Now I have two images for each photo. Help!! How can I change this?
How did you import from iPhoto? If you saw the Import panel with raw -jpeg pairs, then you probably did not import your iPhoto library as library, but as files, and then you will see plenty of duplicates - previews, thumbnails, originls, edited versions. If that should be the case, it would be better to delete the import from iPhoto and to import your iPhoto library again, but this time using "File > Import > Library".
Only that would require compatible versions of iPhoto and Aperture. What are your Aperture and iPhoto version numbers?
Maybe you are looking for
-
How to access values in process request
Hi guys, Wondering if some one could shed some light on the process of getting values in PR. The situation is that i have linked two pages and both have dateFrom and dateTo fields, the values of the fields are being copied across to the other page au
-
ITunes 10.1.2 and Store
I just updated to iTunes 10.1.2 and now the Apple iTunes Stores seems to be flaky. It will load some times, hang and get beach ball o'death, or come back and say unavailable. My downloads are responding in a similar manner. I was notified through e-m
-
Case for MB Pro(Retina)?
Is there any Speck 15" SeeThru Satin Case for MacBook Pro(Retina) to come? cheers
-
Proper Data Not showing in Preview Mode
Hello, I'm using the Dashboard Design tool to create a dashboard with Input controls on 2 stack column charts. There are 7 Input Targets pointing to 1st stack column chart, the SUM of all these targets need to be populated on one of the values in th
-
10.1.3 cache synchronization using custom RMI code
I am trying to port our custom RMI synchronization code (overriding RMIClusteringService) from 9.0.4 to 10.1.3. It works by sending an update message to the remote cache whenever an object gets changed on the local cache as follows: 2006.05.15 11:28: