Button fills up whole of the frame !! what am I doing wrong??
I am trying to open a frame from an applet and I have put a button in the frame .
But , it fills up the frame window..
How can I make it into normal sized button..???
code is given below..
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
class SampleFrame extends Frame {
String msg=" ";
Button b2;
SampleFrame(String title) {
super(title);
b2 = new Button("Iterate");
add(b2);
b2.addActionListener(this);
MyWindowAdapter adapter=new MyWindowAdapter(this);
addWindowListener(adapter);
public void paint(Graphics g)
g.drawString("This is in frame window", 10, 40);
class MyWindowAdapter extends WindowAdapter {
SampleFrame sampleFrame;
public MyWindowAdapter(SampleFrame sampleFrame) {
this.sampleFrame = sampleFrame;
public void windowClosing(WindowEvent we) {
sampleFrame.setVisible(false);
public class appframe extends Applet implements ActionListener {
Frame f;
Button b1;
public void init() {
b1 = new Button("Enter");
add(b1);
b1.addActionListener(this);
f = new SampleFrame("A Frame Window");
f.setSize(250, 250);
setBackground(Color.cyan);
public void stop()
f.setVisible(false);
public void actionPerformed(ActionEvent ae){
String str = ae.getActionCommand();
if(str.equals("Enter"))
f.setVisible(true);
public void paint(Graphics g)
g.drawString("This is in applet window", 10, 20);
}
I got the reply to this post...
Similar Messages
-
i do all the steps to set wirelessly my TC but when i do my network can't find it. i don't have a modem near by but i have good signal to the mac. what am i doing wrong?
Since you mention that the "modem" (which I'm guessing is a wireless router) is not close to the Time Capsule, I'm guessing a second time when I ask if you are trying to configure the Time Capsule to "join" your network using wireless only.
Is that correct? -
HELP -- hi with apple Configurator why does it show with a yellow triangle on the right side of the screen what am i doing wrong for the ipads not syncing or whatever and how do i fix that? although i have looked online to try and figure it out and here is the website i found is this the stuff i need to do to fix this? is this site what i need to do to fix this? http://edtechstandish.wordpress.com/what-ive-learned-about-apple-configurator-so -far/ Thanks
Sorry but I don't know anything about this. But you might have better luck posting this question over ing the iPad in Business and Education forum here: https://discussions.apple.com/community/ipad/ipad_in_business_and_education?view =discussions.
-
when asked to put in a 24 didgit serieal number my serial numbeer has letters and it won`t allow me to type in when i put in the letter,what am I doing wrong?
If it has letters it is not a serial number. It is likely a redemption code.
Redemption Code Help
http://helpx.adobe.com/x-productkb/global/redemption-code-help.html -
When I try to install software update to my phone, it sends the message that I am not connected to the internet. What am I doing wrong?
Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region...change here.
-
I just moved to the UK the US. I have a 2009 Macbook Pro and today attempted to charge it, with an adapter for the plug. BUT I can't get the computer to charge, what am I doing wrong? I am almost out of battery! Help!
To be on the safe side, get the travel pack for the magsafe; the UK 3-pin adapter replaces your 2-pin US adapter on the transformer.
Meanwhile, check that the adapter you're using is compatible with the US 2-pin; most adapters sold in UK are for French and German 2-pin plugs, which are slightly differently spaced, so you may not be getting a proper connection. -
I have just purchased my first iPod touch and I cannot transfer my music from my laptop. The sync button does not appear to work. What have I done wrong? I am a grandma trying to keep up with technology please help.
Connect it to your computer and restore it as a new device. Then chose what music you want to sync with it and do so just like your Touch does.
-
I cannot reset my iPad. I can't turn it off either.
I can't sync it with my computer because the iPad has a passcode.
I tried a reset holding down the stop button and homie button until the apple logo
appears. It appears and stays on for about 4 minutes That is replaced with the
spinning dot. In about 5 or 6 minutes, that goes off too.
It is running iOS 7. something.
help!
thanksYes. You did state that and I missed it. My apologies.
You you could try erasing the device using Find My iPhone, and then try to restore, but if the power button isn't working .... and it's a hardware problem .... you would still be in a bit of a sticky situation.
IF you just connect the iPad to your computer and launch iTunes, does iTunes see the iPad? If it does, can you click on Restore in the Summary Tab? -
I only bought the Ipad 2 yesterday, and as of yet have been unsuccessful with connecting the Ipad to the internet. I have followed all of the instructions provided and have contacted both the provider of the Ipad and my internet service, all to no avail! The Ipad shows that it is connected to the wi-fi but on checking the details on the selected IP address the number begins with 169 (I understand that this could be the problem) however when you ask for "renew lease" it doesn't change the number. The Ipad is also not picking up any of the router details. Hope I've provided enough info for any help!
The problem could be due to your router or your iPad. To isolate the problem test your iPad on some other networks.
If it has problems on other networks your iPad probably has a problem. You could try Settings > General > Reset > Reset Network Settings to see if that corrects the iPad problem. If that does not help your iPad may need repair/replacement. Contact Apple to resolve.
If the iPad does not have problems on other networks the problem may be in your router. You could try restarting your router (remove power to it for 30 seconds and restart) to see if that helps, however, there could be a firmware problem in your router. Check the manufacturer's support Web page to obtain the latest firmware for your router.
If you need more help please give more details on your network, i.e., your router make, model and version, the wifi security being used (WEP, WPA, WPA2), etc.
See also http://support.apple.com/kb/TS1398 -
we transferred purchases and synced from a iPod touch to a toshiba laptop, after it updated and synced again we have been unable to put the files back onto the ipod. the computer will not let us drag or copy paste files, and when we tried to " export" the library to the documents folder, it only showed up in code. we have books and music we would like to reload to the ipod.
Hello Jean164,
Thank you for using Apple Support Communities!
It sounds like you are unable to manually put your content back on your iPod Touch.
It seems like you may need to re enable Manually Manage Music now that the device has been updated, and this article should help with that.
Managing content manually on iPhone, iPad, and iPod
http://support.apple.com/kb/HT1535
Cheers,
Sterling -
When i print my photos are not centered on the sheet, what am I doing wrong
When I print my pictures they are centered on my sheet. I have a HP J6450 Officejet. Are there settings that I have not set up right. I use Photoshop CS4. Hope there is someone that can help me.
DennisWhen you choose print in PS CS4 and the print screen pops up make sure Center Image has a check mark in it.
-
Just bought iPhone 4 has been removed from owners account but still can't activate the phone in my name or do anything with it
What kind of error message is preventing you from doing it?
-
I bought movie on my ipad and watched them. I then bought movies on my HP desktop from iTunes but when I synced my ipad to get them to download it took off the movies and won't let me download any of them, it says Some of the videos in your library were not copied and cannot be played on ipad, but I think I've done everything right. Does anyone have a suggestion?
the only time i ever got that error was when i would drag videos i encoded myself into itunes (not purchased from apple).
the solution for me was that the audio track was not in the correct format. ipad and iphones want the video to contain
a H.264 video track
a AAC audio track
when i would try to import m4v videos and i got that message it was because the audio track was not AAC and it was another format like MP3 or WMA/wav -
Using my Apple ID and password on Mobile Me, I get the message "Verification Failed". Could not communicate with the server" What am I doing wrong?
There is a MobileMe forum. You might have better luck their.
-
I have a Small spreadsheet Created in XLS Format on my home PC when I email to my Ipad 2 and open in Numbers I loose the Hyperlinks
what am I doing wrong, I also need to be able to generate and edit hyperlinks on the I Pad as I maynot have a PC availiableThis forum is dedicated to Numbers on Mac OS X. So there maybe some people who have Numbers on an iOS device here but they seem to less active. There is a forum for Numbers on iOS you can post in.
The iWork on iOS forum is here:
https://discussions.apple.com/community/app_store/iwork_for_ios
I personally do not have iWork on any iOS device but can still ask questions that may help.
1) are the cells with URLs completely empty after opening in iWork on the iOS device?
2) can you show what the spreadsheet on the PC looks like? specifically regarding the URLs?
Maybe you are looking for
-
Is there a way to restore the All Contacts app on my gen 1 ipad? I seem to have lost the data and can't turn a page or add new contacts. I did try to reload the contacts (and I guess everything else) from my itunes computer backup but nothing happe
-
Synching Issues with iphone 4/ itunes
When attempting to synch my iphone with itunes, the synch cannot progress past the "backing up" stage. Why?? Getting a bit frustrated now to be honest. Every time I plug my phone into the computer, itunes informs me of the latest update required (4.3
-
IMessages not functioning on OS X Mountain Lion's Messages
I just noticed that I am unable to send or receive iMessages on the Messages app on OS X Mountain Lion. I checked the accounts, and the only two active are my facebook chat (which I regularly use) and Google talk. I do not see an iMessage account. Wh
-
Playing FLV files on the timeline in a secondary scene?
I'm currently working on a project where I mix animation sequences with short videos. My project also has two scenes and the FLV will be placed on the main time line of the second scene. The problem I am having is, if the movie is previewed from the
-
Microsoft Windows Server 2008 R2 Datacenter with SP1 Activation Failed
I'm new here, I've got the following problem: For my study I had to install a Windows server. I Activated this Windows Server and all was good. I configured Windows Server and found out it wasn't configured as I wished and a clean install would be mu