How to put picture or ascii art in jframe.....

hi guys....., am a newbie in java, i found difficulties when am trying to put picture or an ascii art in jframe, maybe u guys can give me some hints....(based on my code),here i submit a part of my code in jframe section:...
import java.awt.*;
import javax.swing.*;
import java.awt.Color;
import javax.swing.JOptionPane;
import java.util.Date;
class MyFrame extends JFrame
     public void paint ( Graphics g )
               this.setBackground(Color.BLACK);
               g.setColor(Color.RED);
               g.setFont(new Font("Serif", Font.BOLD, 18));
               g.drawString("WELCOME", 200, 50);
               g.setFont(new Font("Serif", Font.BOLD, 14));
               g.drawString("\n", 10, 70 );
               g.drawString("Date = " + new Date(), 10, 140);
     }

newbie.... wrote:
thanks for the reply sabre150...
did you mean i must create a new object inside that frame (like JPanel), instead of painting the frame itself?, Yes.
but how if you want to put picture or even painting the object itself?I don't really understand. Do as you have in your current code but do it in the paintComponet method of a JPanel and set the JPanel as the 'content pane' of your JFrame. I don't know how else to say it!

Similar Messages

  • How to put pictures inside the table in Pages for IPad?

    How can I put pictures inside the table in Pages for IPad? I can do that in Pages in my macbook, but I can't in IPad.

    It would appear that unless you are working from a document that already had section breaks (or the equivilent) ,you can't. I have some files in pages that began as MS Word documents with multiple sections that allow that by tapping on the footer (or header) and making the change. Files created in Pages (or from other sources but without section beaks) do not.

  • HT1678 how to put pictures from ipod to computer

    how do i put pictures from my ipod on to the computer?

    Do you have a PC?
    This may have changed by now but when I went to the Apple store about a year ago I heard one of the Geniuses/Genii(??) talking to someone about how for some reason you can't sync photos from an i device to a Windows PC using iTunes
    you can get around this by emailing the photos to yourself and then opening them up on the computer, though

  • How to put pictures in a table

    I am seeking how to store pictures in a table
    Could you help me please?
    thanx
    bye

    Look into BLOB datatypes. They allow the storage of large binary objects (like pics). If you have the 8i Web Dev book there is a great example of dealing with images stored in a table.
    -A
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Fabien PREUD ([email protected]):
    I am seeking how to store pictures in a table
    Could you help me please?
    thanx
    bye<HR></BLOCKQUOTE>
    null

  • How to put picture files and other things on my BB 8703e

    Hello! I know I got a bit of a throwback bb, but I am using it until I can upgrade to a new phone on sprint.
    So, I am barely learning about this bb, so any help or cool uploads and apps I need to add... Please let me know.
    Now I got this app, that will supposedly let me play music files. However, i cannot seem to figure out how to put any files on here when I connect my bb to my computer. When I initially connect the usb it will be like BB connection detected, but it doesn't show a folder or anything...
    Where should i be looking....
    What should I do?

    With the 8707, I believe you will need to visit a website and download the image from there, or from an email you send with the image attached.
    Music or ringtones will need to come from visiting a site with music or ringtones, from the BlackBerry browser.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to put pictures alongside songs whilst they're playing?

    I was just wondering, how would you use itunes to put album cover/art like the ipod ad with gorillaz and demon days(picture) like that?
    =================
    = On top
    = The Killers
    PICTURE = Hot Fuss
    =
    =================

    Add the album art in iTunes and it should go onto your iPod automatically. Hope thats enought infor!

  • How to put pictures on an external hard drive from iphoto on a macbook

    Yeah there are pictures on my macbook pro iphoto that i want to put on my external hard drive, but im not sure how to do it, all help is appreciated thanks.

    Files on disk have no order - they are given the order by the viewing program - finder on the Mac - using the finder you can view files by many different sorts - file name - date created - date moified - size - etc
    Deciede how you are going to sort them when you view them and then export them so that sort works for you
    Generally using an alpha sort to view and exporting using the sequential nameing option is the solution - see the user tip on exporting for the options available
    LN

  • I need to know step-by-step on how to put pictures on my nomad zen ex

    Every time that i try to put a picture or video clip onto my nomad zen extra through data files under nomad explorer there is an error. I go to my pics then put them in nomad explorer data file then i don't know where to put the pictures so i can put them on my zen xtra. Well when everer i put them somewhere it says error<FONT size=6>. So plz help me by telling me a step-by-step process so i can do this.
    <FONT size=7> Plz HELP Me

    beachboy,
    Try doing a Clean up from Rescue mode. The sticky at the top of this (MP3 Players) forum covers the steps on how to get into Rescue Mode or you can check out the Knowledgebase article for the ste
    ps.
    http://us.creative.com/support/kb/article.asp?l=2&sid=4794
    Jason

  • How can put PICTURES in my ipod back to my PC?

    Hi I recently lost all my files from my pc and I rememeber I have all my pictures in the ipod, How can I get it back to the pc?

    I'm sorry, I really don't know.
    Check this out: http://engadget.com/2004/11/02/how-to-get-music-off-your-ipod/
    Edit: This is exactly what you're looking for, but is only for Mac: http://www.macworld.com/weblogs/macgems/2005/11/keithsipodphotoreader/index.php

  • How to put pictures into folders

    How do I put pics into folders?

    These links may be helpful.
    How To Create Photo Albums http://tinyurl.com/cxm4eoq
    How to Add New Albums in the Photos App on the iPad & Add Photos to the Album
    http://tinyurl.com/7qep7fs
     Cheers, Tom

  • I have NO idea how to put pictures on my iPod nano

    Okay i drag the picture into my library but it doesnt allow me to.

    ROFL
    Sorry you cannot drag image files into your Itunes Library, because Itunes us not an image viewer software. But if you want to upload photos onto your ipod then you can do it through itunes. How?
    OK, choose a folder at any location on your computer that contains photos you want in ipod. Now when you are connected with ipod through itunes, go to Ipod options box
    and you can select that particular folder in the photo option. After that the itunes will sync it to your ipod and whatever image file is in that folder will be on your ipod.
    If you delete any photo from this folder, then it will be deleted from your ipod as well. If you organise more sub folders in this folder, you will see same organisation in your ipod as well...its coool
    enjoy

  • How to put pictures in the same size (adjustment) ?

    Good afternoon everyone
    I have a problem.
    I did a fla with 3 components images (loader), and a button.
    I would like to know what code would use so that when I click on the button I load the 3 images but adjustable, is said to be in the same size.
    When I export to swf. everything looks good. the photos are adjusted to your size. but when I upload it to the internet, my hosting, the photos are great and are not adjusted.
    What would be the problem and what solution do?
    Wait for a response
    regards
    Roger García

    I don't Understand
    I have a button and the code I have is this included:
    on (press) {
    _root.boton1.imagen_mc1.load("4.jpg");
    _root.boton2.imagen_mc2.load("5.jpg");
    _root.boton3.imagen_mc3.load("6.jpg");
    stage.scaleMode = StageScaleMode.EXACT_FIT
    stage.scaleMode = StageScaleMode.NO_BORDER
    a Help ....... 
    A greeting.
    Roger García

  • How to put pictures from my pc on my iphone 4s?

    thank you

    Hello Benghea,
    It sounds like you would like to sync photos from your Windows computer to your iPhone. You can do this in iTunes the same way you would with Music, but you would click the Photos tab when you have the device selected in iTunes:
    iTunes: Syncing photos
    http://support.apple.com/kb/ht4236
    To sync photos from a folder on your computer to your device
    Place all of your photos into a folder on your computer. You can organize photos into subfolders to make albums.
    Select "Sync Photos from."
    Select "Choose folder" from the pop-up menu and choose the folder where you stored your photos.
    Click Apply.
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • How do I put pictures on my Nano?

    I just got my Nano and I can not figure out how to put pictures on it. PLEASE HELP!
    Sony   Windows XP  

    http://www.apple.com/support/ipod/tutorial/ipgettingstartedt9.html

  • How do i put pictures on adobe flash on computer

    was wondering how to put pictures on whiteboards in my pc . thanks

    thank you ned for responding... my kids play this game on the pc. it is a flash game. meaning when u copy an image from the pc to put anywhere else in  the pc you just copy and paste pretty much. but with this flash game you right click it like anything else. except the screen goes blank and there is no way for me to get the personal pics on there.  any help would be greatly appreciated. this is not for any work related. i am not trying to make a buck. also if you do know of a way please respond like im a 6 year old.  not really computer savy and my kids are 6 and 8 so they cant help either. thank you for taking the time to read this.

Maybe you are looking for