I just want to set my Jlabels coordinates, how hard can that be???? HELP
hey, basically this is the first time ive ever touched java therefore bear with me. Basically all i want to do is set an images coordinates so its where i want it to be. i want the image to stay there permently.
Please help
import javax.swing.JFrame;
import java.awt.image.BufferedImage;
import javax.swing.Timer;
import javax.swing.ImageIcon;
import java.awt.FlowLayout;
import javax.swing.JLabel;
public class Main
public static void main(String[] args)
JLabel image=new JLabel(new ImageIcon("image.gif"));
frame.add(image);
rame.setVisible(true);
hey, basically this is the first time ive ever
touched java therefore bear with me. Basically all i
want to do is set an images coordinates so its where
i want it to be. i want the image to stay there
permently.Two options.
Option A:
Use a null LayoutManager for your JFrame and explicitly set the bounds of the JLabel:
frame.setLayout(null);
image.setBounds(x,y,w,h); // x,y,w,h are calculated by you somewhere else
frame.add(image);Option B:
Paint the image on the JFrame directly by overriding its painting code.
Neither option is a good idea. What exactly are you trying to create?
Similar Messages
-
I have gotten a giftcard for iTunes and I want to spend it but before I had a credit card giftcard and I spent it all and now I don't have a credit card and I just want to use thee iTunes one how do I delete the card on my iPhone
Hello Clancbelle,
It sounds like you have a credit card saved to your Apple ID payment information and you would like it to be removed from the account and set the payment method to None. You should be able to do this with the following article:
iTunes Store: Changing your payment information
http://support.apple.com/kb/ht1918
Changing your payment information using an iOS device
Tap Settings on the Home screen.
Tap iTunes & App Stores.
Tap your Apple ID. (If you aren't signed in, enter your Apple ID and password and tap Sign In.)
Tap View Apple ID.
Enter your Apple ID password.
In the Edit section, tap Payment Information.
Update the information that you want to change.
Tap the Done button when you're finished.
Thank you for using Apple Support Communities.
Cheers,
Sterling -
Just installed Firefox 9.0.1. When opening a new browser session, two tabs will open. One is my home page and the other is a Firefox welcome page. I just want my homepage to open. How do I achieve this? Thanks.
See these articles for some suggestions:
*https://support.mozilla.org/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
*https://support.mozilla.org/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
*http://kb.mozillazine.org/Preferences_not_saved -
my ipod was stolen. I do not have the serial code, and I want to set it back to factory settings so that no one takes my information, Help!!!
The serial number is not required and would not help
lost/stolen
No app is required.
- If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
iCloud: Find My iPhone
- You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
- If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
- Change the passwords for all accounts used on the iPod and report to police
- There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
- Apple will do nothing without a court order
Reporting a lost or stolen Apple product
- iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number -
Can I take an older imovie made back in 2009 found on an old external drive and get it to iCloud? When I try to open it, it says can't open because the file was iMovie 9.0.9. I just want to get it on Theater so I can watch on Apple TV and have in iCloud
ERROR (1)
- Place the iPod in DFU mode and then restore
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
- Try on another computer
- Try another cable
- If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar -
Macbook pro will not restart to download update instead goes straight to download?
macbook pro will not restart to download update instead goes straight to update download probably simple setting prob but i dont know can some on help me i just replaced a dieing hard drive and and im running on 08 software pleas helpi replaced my hard drive and put osz back on now im trying to update but will not update supost to restart then update but instead of restarting it goeses to update and i have to shut it down pleas ignore typos im trippen
-
My iPhone is skipping back to the start of a song every time I unlock it, especially when I am replying to a text message, this is very frustrating and just want to know if it is a simple bug that will be dealt with in the next update?
Assuming the phone isn't jailbroken, the basic steps (as needed) are:
Restart phone (you already did this)
Reset phone
Restore phone in iTunes using a backup
Restore in iTunes as new, without using a backup
See appendix B of the User Guide for details
http://manuals.info.apple.com/en_US/iPhone_iOS4_User_Guide.pdf
If your phone is jailbroken, this is the most frequent cause of the problems you described. Restoring could permanently brick the phone.
Note that your iOS is old and the current version is 4.2.8. It's odd that it wasn't updated when your activated your phone in iTunes, being that you got it last Friday. -
I know my Game Center username and password, but I don't know the email (or maybe apple id) that is for my account. It is not my normal one. I can't log in with just my username, so does anyone know how I can get my email?
Can you help me pleaseDear
I have worked renovation of the device and have an account, but I forgot my email
I do not know E-mail has been linked in game center
I have a name defined in game center
Do I have the possibility of knowing E-mail has been linked in game center -
Hi, I'm stuck at step 9. I don't see my external harddrive when I want to save the DMG backup file. Can you please help me with this? I'm desperate to make this backup! Big thanx in advance!
http://support.apple.com/kb/HT1553Repair permissions and restart your computer. If this does not work, zap the pram. You should now see your external hard drive.
-
Hi guru's i want to dovelope or modify bapi how we can give name for bapi
hi guru's i want to dovelope or modify bapi how we can give name for bapi plz help me...
Hi,
If u want to assign the form to Standard sales order, The, this form in the NACE.
and the, Run from va02/03.
Reward Points,
Vamsi. -
I have been using GRAB to capture screen displays. It has just stopped working since the last OSX Upgrade. Can anyone, please help restore functionality?
Thanks for that. I did as suggested but when I tried again, it still did not work. Another com.apple.Grab.plist appeared in the Library.
I now have the following files in Library
file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist
file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist.lockfile
file://localhost/Users/peterpatel/Library/Preferences/
file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.plist.lockf ile
What do you suggest I do now? -
I don't want other computers connect with my computer, I don't want sharing my macbook pro, so how I can protect my computer and avoid other people connect with my computers
As long as you do not enable Sharing of any kind (System Preferences > Sharing) no other computer can connect with yours. Also make sure you have your wireless network protected with a WPA2 password.
That's all I can suggest without knowing what OS version you are running (you are not running iOS as that is for iDevices). -
HT4839 I cant find the cellular data setting on my iphone how i can fix it
i cant find the cellular data setting on my iphone
how i can fix it
because I can't use the internet with my iphone right nowIf you go into Settings>General>Network, you should still be able to access VPN settings. My listings show Cellular Data, Data Roaming, Set Up Personal Hotspot, VPN and Wi-Fi. I do not use Personal Hotspot (tethering) so mine says Setup. However, VPN settings are different than cellular data settings. Not sure which you are asking about now.
-
Dear,
I have Iphone5 with sim free brought on apr 2013 now i want to upgrade iphone5 to iphone5S. how to do that.
weather i can go for update or is possible pls clarify me.Venkata kiran wrote:
My question if i have iphone 4S now i want to upgrade Iphone 5S in directly apple store wht is the process.
Go to an Apple Store. Request the phone you want. Give them money or a credit card to pay for the phone. -
I just purchased an ipad. When I plug it in to my computer it won't show under devices in itunes. I already have itunes set up for my ipod touch. I just want to share the music etc thats already there with both devices. How do I get my computer to recognize that the ipad is there?
The latest model requires iTunes 10.7 or higher. Check iTunes to make sure you're running a compatible version. If so, see:
iOS device not recognized in iTunes for Mac
iOS device not recognized in iTunes for Windows
Maybe you are looking for
-
The attempt to burn a disc failed. An unknown error occurred (-51)
My company just purchased a MacBook Pro to go along with our iMac computer. I spoke with an AppleCare guy who talked me through using Migration Assistant to copy my files from the iMac to the MacBook Pro. After doing this, I am able to use the MacBoo
-
hi, using this function module i want to find the number of pernrs having d-p relationship. then with this FM how can we find pernrs with relation ship D-E-P. how to use P up and down.
-
I have installed a second hard drive (500GB Western Digital SATA SE16) in my Mac Pro quad-core. The drive spins down regardless of the power management settings (system preferences) and does so even when I'm actively working, but not directly accessi
-
Major build needs power management options
hello, i recently acquired a mac pro 2008, 8-core 2.8. with the help of an atto r348 and a a kit from maxupgrades, i put in 6x1.5tb seagate barracudas raid 5, 2x250 es.2 raid 0. i also have 32gb ram from transintl, a evga geforce 285. originally i we
-
Press Backspace key does not refresh the softkeyboard screen
Hi, I'm finding a very weird issue in Adobe Air 3.7 and 3.8 (haven't tried in older versions). When the user clicks on the textfield and the softkeyboard is displayed the key "backspace" doesn't seem to work, nothing seems to be deleted. But when the