Drawing in NetBeans  (Hope this is the right forum)

Hello.
I got a litle question.
can I draw pictures on the the frame with the GUI builder? (I mean if there is a button "draw picutre" or maybe something through the properties on the frame/panel or something like that)
or I need to override by myself its paintComponent() method in the source tab?(or I need to write the paintComponent() code manually)
I am using netBeans 6.0.1 if its matter..
If its not the right forum for my problem please tell me
Thanks in advance , Gonen
Edited by: Gonen on Mar 16, 2008 8:35 AM

Gonen wrote:
but I got already a picture that I want to draw (JPG file)I'm sorry, my bad but I misunderstood you. So you want your application to show a picture, is that it? If so, the easiest way I know of is to create an ImageIcon with your picture, place this imageicon in a JLabel, and show the JLabel. If you need to show a picture in the background, then you'll probably need to override the paintComponent of a JPanel, draw the image there using a graphics method such as drawImage(...). You can learn a lot about how to do this here:
http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html
here:
http://java.sun.com/products/jfc/tsc/articles/painting/
and here:
http://java.sun.com/docs/books/tutorial/2d/images/index.html
http://java.sun.com/docs/books/tutorial/2d/index.html
Here's a simple example of using an ImageIcon:
        try
            String imageFile1 = "disc/d1/f/image1.jpg";
            icon1 = new ImageIcon(ImageIO.read(new File(imageFile1)));
            JPanel jp1 = new JPanel();
            jp1.add(new JLabel(icon1));
            //.... more code here
        catch (IOException e)
            e.printStackTrace();
        }Good luck
Edited by: Encephalopathic on Mar 17, 2008 9:56 AM

Similar Messages

  • Hi everyone, not sure if this is the right forum to ask this question, however any redirect is appreciated. Where can I get the download for the latest old mozilla browser. The one with the dinosaur icon before the browser turned firefox. Thanks, Jen

    Hi everyone
    Not sure if this is the right forum to ask this question, however any redirect is appreciated. Where can I get the download for the latest old mozilla browser. The one with the dinosaur icon before the browser turned firefox. Thanks, Jen

    Phoenix and Firebird were what Firefox was called before Firefox was settled on in 2004, and both used "birds" as the logo. IIRC, the dinosaur was used in the Mozilla Suite.
    Here are the earliest versions of the Mozilla Suite. <br />
    http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/
    I hope this request for a historical purposes of where Mozilla came from, because those old versions aren't safe to use on the internet any longer.

  • Videos from websites wont show up....not sure if this is the right forum.

    Videos wont show up from any websites.
    The place where a video would be just isnt there.
    Music from myspace will not play as well.
    Any suggestions?

    I experienced the same thing with my Safari after the 10.4.11 upgrade. However, the following procedure worked for me:
    Go to - System Preferences > QuickTime
    then click on the 'Streaming' tab. Make sure the Enable Instant-On is checked. Set it to Play immediately. Re-start Safari. Videos should now work.
    Somehow after the upgrade, the streaming setting on my safari was set to a long delay. Thats probably why the video wasn't showing.
    Hope this helps.

  • Not Sure if this is the right forum but took a chance

    I need to know the following information about the 3D tools used in photoshop.
    How can it be used? What are the tools used for?
    I need an example of how it can be used.
    Where can the tool be found specifically,
    I am taking a class and this is one tool I haven't a clue what it is or where it is. Please email me at [email protected]
    Thanks for any advice you can give me.

    I am assuming you have Photoshop CS3, CS4, or CS5. If so, the 3D tools are only available in the Extended version of Photoshop.
    Here is a link for the Photoshop forums. Select the forum that supports your OS.  If you ask on the Photoshop forum, be sure to say which version of Photoshop extended you have as the 3D tools have been updated each year.
    http://forums.adobe.com/community/photoshop
    You might find these layers magazine videos useful.
    http://layersmagazine.com/search?cx=005341607010211352335%3Anmvcohf4eqe&cof=FORID%3A11&ie= UTF-8&q=Photoshop+CS5+3d&sa=Search
    Here is a list of videos on the subject:
    http://www.google.com/search?hl=en&client=opera&rls=en&tbs=vid%3A1&q=Photoshop+extended+3d +tools&btnG=Search&aq=f&aqi=&aql=&oq=&gs_rfai=
    I personally would not be a best one to give you the workflow as I have 3D applications that are designed to do this type of thing. I can ,however, pass along a tip that I figured out while working on a contest using a trial of CS5 Extended. (Make a folder and put the 3D object and the texture files in it together. If you don't put the texture files in with the 3D model, the texture doesn't come into Photoshop applied.)
    Adobe help document and how to access 3D tools...
    If you have CS5, look for a header that says 3D in your menu bar. There you will find the 3D options. 3D tool icons also appear in the tool box.
    CS5 Help:
    http://help.adobe.com/en_US/photoshop/cs/using/WSba26e7b0742782c7399326471256fcde1d6-8000. html
    If you have CS3 or CS4, there isn't a menu item. You have to open a 3D object file. 3D tools only appear if a 3D object layer is selected in the layer's palette.
    CS4 Help:
    http://help.adobe.com/en_US/Photoshop/11.0/WS113B8785-AF61-4c4f-B347-4FA19C5A30ABa.html
    CS3 Help:
    http://livedocs.adobe.com/en_US/Photoshop/10.0/help.html?content=WSAFADA17D-C72B-4a80-B18C -F717376F2B4E.html

  • Not sure if this is the right forum...

    ... but here goes.
    is it possible for any one out there to give me some simple tips on uploading a dvd to my hard drive memory so that i may enjoy it that way?
    H.Bomb

    If it's a non-commercial, non-copy protected DVD, simple copy the VIDEO_TS folder to your hard drive and then use Apple's DVD Player application to play the VIDEO_TS folder.
    If it's a commercial, copy protected DVD we can't help you under the Apple Forum Terms of Use (but the above won't work).

  • Another "2 seconds on 3 off" problem (Hope this is the right place)

    It's kinda hard to figure out what goes where around here, so if this is in the wrong spot, feel free to move it - but please tell me WHERE you moved it to. Thanks.
    The guts:
    MoBo: MSI P55M-GD45
    Processor: Intel I7-860
    Memory: 4x2GB Corsair XMS3
    Graphics card: MSI/R5750-PM2D1G HD5750 R
    Case: Rosewill Smart One
    Power: Rosewill Green 530w continuous
    HD: Seagate Barracuda 7200.12 750GB
    I put this all together the other day, minus the HD (hadn't arrived yet). I started with 2 mems after reading stories about how 4 might not register.
    I started it Saturday, and it lit right up, but I shut it down quickly as it was only a test. This morning, I added my monitor, keyboard and mouse and restarted it. Up came a glorious MSI screen. I rebooted and went into BIOS just to look at the goodies, exiting without changing anything. So far, everything running smoothly.
    I powered down and added the other two memory sticks and - blooie!
    I now have the same problem others have articulated: press the power on and it lights up for a second or two (all fans and leds go on) and then it shuts down. If left on, this repeats and repeats...I stopped it after 15 minutes.
    Cleared the CMOS by the jumper method; nuttin. Tried again using the "take the battery out" method; again, alas, no change.
    So I tore it down to mainboard and CPU, undid and reseated the CPU, added more silver thermal, plugged in the power and...crap. Changed the memory to one stick. Nope. Two sticks; uh-uh. I don't have ready access to another power supply and somehow I don't think that's the problem.
    Is it just me or is this happening more often than it used to? Anyone have any other roads I might travel down

    Sorry, I must have overread the part where you said that the system does not turn on anymore. 
    Quote
    I'm beginning to suspect the board
    That's possible but it is not the only available explanation.
    It could also be a PSU issue or a problem with you video card.  Without further tests, however, all we have are hypotheses that remain to be proved or disproved.
    Quote
    because it's a lot cheaper than the processor.
    Even a 1 million dollar processor is subject to potential damage (sadly).

  • I sure hope this is the right place to ask this question.

    Hello.
    Is there a place where I can record and then listen to the recording of my voice? I need to say something into it for an assignment at school.
    Thank you.

    Hello 
    Open GarageBand
    Click New Music Project, choose a location and click Create
    In the bottom left hand corner click the + symbol and choose Real Instrument, click Create.
    Click the Red record button ◉ in the bar at the bottom. You are now recording.
    When you're finished click the pair of scissors ✂ in the bottom left hand corner of the window to open the editor and you can then use cut, copy and paste commands to edit as required.
    Then if you need to burn to disc:
    Choose Share menu > Send song to iTunes
    Open iTunes
    Create a playlist by clicking the + symbol in the bottom left hand corner of the window.
    Click Burn Disk ☢ in the bottom right hand corner.
    Hope that helps.
    mrtotes

  • Not sure if this is the right forum for this.. disk drive icon on desktop

    for msn messanger. Im a new PC to mac user (3 DAYS OLD)and yesterday tried to install msn messanger. I double clicked the install file and it made a diskdrive icon in white. When I dragged the icon to the trash (msn already installed), the trash bin turned into an eject icon. I emptied the trash (like I would on windows) and the msn icon on the dock vanished. I reinstalled it and this time there was a question mark on the msn logo. So msn now works but I have an icon which I dont need on my desktop. Does this happen with all installs?

    Ok this isn't working. Im on the mac so I'll tell you exactly whats going on. I downloaded msn messanger mac version 5.1.1. The download window opens up and it downloads. I close that window. There is still a window open called "Microsoft messanger" with the icon (blue/green people). If I double click that or drag that icon to my dock bar msn opens up.
    At this point I have the messanger511.dmg file sitting on my desktop. If I quit msn the icon stays in the dock. If I eject the dmg file or put it to the trash bin, when I goto open up msn from the dock there is a question mark.
    This has been my whole point. It seems if I remove that .dmg file the program doesnt work.. am I missing something?
    ok update... I read back a few replies about the question mark thing...I had to drag the icon to the application folder as it wasnt in there. At that point I could eject the image file and everything seems ok..however when I start msn from the dock, the white disk drive shows up in finder where the macHD and the network icons are. I can eject it and it goes away but this shows up everytime I start msn..
    should I of had to do this?

  • Is this the right forum for this? Using a foot pedal to control apps?

    My girlfriend is doing medical transcription - she listens to audio and she types. People who do this, often use a footpedal to play, pause, rewind, etc. while transcribing. I'm hoping to set her up on the Mac to do this, there are pedals which are Mac compatible, but I don't know what their limitations are, or what is possible.
    I found some typical USB pedals, examples here:
    http://www.altoedge.com/pedals/
    ...and I'm wondering if anyone has had any luck using them? Can they be configured to control certain menu functions in any application? such as using the keyboard shortcuts in the System Preferences to control certain commands in other applications? I'm thinking that I could make great use of a pedal like this to control any audio player - iTunes, Garage Band, or a 3rd party app I bought and love, "The Amazing Slow-Downer" so that I can use this to practice with the guitar, playing along with recordings, similar to how she would do the exact same thing while listening to recordings and typing.
    I hope this is the right forum to bring this up. I don't have the pedal, I'm thinking of getting one, but I was hoping to get input from someone before springing for one. Thanks!!

    Well, this took me a while to get solved, but it is indeed solved.
    I tried USB Overdrive and it could, and perhaps should work, but apparently it will not. When adding a device, it seems that USB Overdrive is not set up to handle any input device that does not register itself as either a Mouse or a Joystick. The VEC USB Footpedal that I'm using is "Device type: Other".
    So, I went for Quickeys. And Quickeys can do it all. It did recognize the device, I was able to assign it to the scope of the particular audio playback app I wanted to use (Amazing Slow Downer OS X - which is truly amazing. Any musicians reading this who are looking for a way to learn pieces by ear, this does it better than anything else I've seen yet).
    I created a shortcut in Quickeys for the ASD app; added the middle button of the foot pedal as the trigger; set one step, entering 'space bar' as the step (which toggles playback, similar to many audio players).
    It all worked.
    Quickeys is very confusing and seemingly featured with an endless array of options. Enter at your own risk. Ask me for help. This was the only way to get it done that I could find. I did write to the author of USB Overdrive asking him to please support additional devices as I did find some traction from gamers who like to use a foot pedal in addition to other input devices. There was a Windows-only management utility for the foot pedal that was intended for custom input, assigning the buttons to any keyboard input or mouse click event. It would be nice to have a simple and easy to use utility like this. But, Quickeys did do the job.
    Thanks for your help, you guys!!!

  • I don't know if this is the right section but I experience the following issue with Adobe Acrobat Pro XI installed on Windows 8.1. When I start Acrobat the related window opens normally but, after some scroll up and down along the document, it blocks, Acr

    I don't know if this is the right section but I experience the following issue with Adobe Acrobat Pro XI installed on Windows 8.1. When I start Acrobat the related window opens normally but, after some scroll up and down along the document, it blocks, Acrobat doesn't respond to any command I can give and, in place of the pointer arrow, a vertical bar, as the one of the text editor appears. The only way I can stop Acrobat is by means of the task manager. I tried to de-install and the re- install Acrobat but the behaviour is always the same. What can I do??

    Have you opened Acrobat and gone to Help>Updates to get an updated install?

  • Not sure if this is the right place...Recovery or Finding missing files

    Hi,
    Again, not sure if this is the right place to ask, but its worth a shot.
    so i've been transcribing video all day using microsoft office for mac, and was saving the project (i thought) to an external hard drive. at one point the HD came unplugged, and i plugged it back in. no big deal. i continued to save, to type, save, type, etc until finished. so when i finished and saved the project, seemed okay. when i closed word, it kept asking me if i wanted to save changes...i said yes, and it would just ask me again, did this a few times. i assumed it was asking me to save it to a new location, which i didn't think i needed so finally said no.
    i then find out that somehow when the HD was unplugged it erased Words ability to save to said location. so my last save was really before the HD was removed, which is odd, because i kept saving and never was prompted the path was interrupted or anything.
    so my question is two part...
    1. where would i find in the depths of the computer the saved files? if i was saving, they had to have gone somewhere, but i dont know how to find them.
    2. also, assuming it wasnt saving, my word prefs say it autosaves every 5 minutes, so those files must exist somewhere also, yet can't find them...
    does this make sense, can anyone help me?
    thanks
    austin

    Hi there,
    In Finder, select Go menu>Go to Folder, and go to "/volumes".
    Volumes is where an alias to your hard drive ("/" at boot) is placed at startup, and where all the "mount points" for auxiliary drives are created for you to access them. This folder is normally hidden from view.
    Drives with an extra 1 on the end have a side-effect of mounting a drive with the same name as the system already think exists.
    See if it may be in one of those with a 1 or 2 added to it.

  • Please fix your web plugin immediately, yes this message in the right forum

    Ok.
    On my mac, java takes about 5-10 seconds to load in a web page applet from either safari or chrome.
    This is 4.9 to 9.9 seconds too long.
    PC is a bit faster but not much.
    Sun absolutely wrecked java with respect to the web-client.
    Please fix this.
    Why: Because I want to write web-apps which don't suck. Which means I can't use javascript. Because despite the gajillions of money poured into marketing, it is really very, very slow.
    How to fix:
    It is very easy.
    1. Use PhoneME with JIT. (get startup time to near zero). You might say, "well, we're about to get java to have zero startup time." But this is what you have been saying for ever, and failing at, miserably! Stop trying, give us a JavaME plugin instead.
    2. Do NOT distribute monolithic massive class libraries. Instead, give me the opportunity to create class loaders. (I know you think you already do, but please look up the 10 year old bugs regarding the web plugin and class loaders). Make the distributable as SMALL as possible.
    3. Are you writing the pluginin "in-between" code in webkit? If you are, fire who ever is writing it. If you aren't, WTF, the connection between the browser and java is slow as a slug. If I was just a bit more of a cynic I would think google is putting in usleep(1000) between calls. Take this code over NOW.
    Look, you STILL have a tremendous opportunity in the web-client-space.
    You need to show that Java is BETTER than javascript. Which it could be.
    But currently it sucks.
    It uses too much memory, it has a slow startup time, the connection between javascript and java is slow.
    I should be able to write <script type="jar.pack.gz/java" src="blahblah.jar.pack.gz"></script> and multiply my performance by a thousand. Please do it.
    I should be able to use a java2javascript library to simplify modifying the dom.
    I shouldn't have to write javascript, except for inline code.
    BUT INSTEAD I'M SPENDING MY TIME OPTIMIZING GWT.
    Javascript sucks, we all know it is rising because of a vacuum of any real performance.
    Please fill this void, or someone else will.
    Thanks,
    -tim

    yes this message in the right forum No it isn't. This is a user to user forum. If you want Oracle's attention, submit a bug report, or contact their support channels.
    Locking this thread.

  • My hotmail email has been hacked into. I've changed my password and hope this fixes the problem. Does this mean my imac software is infected. If so what should I do? Everything appears to be working ok.

    My hotmail email account has been hacked into. I've changed my email password and hope this fixes the problem.  Will my iMac system software now be infected and if so what should I do about it?  Everything appears to be working ok.   Is there a free to use software package available on the web, totally secure and reliable, which can scan my iMac for viruses and fix them if any are found.

    Unless you have installed anything, you are fine.
    You may find this User Tip on Viruses, Trojan Detection and Removal, as well as general Internet Security and Privacy, useful:
    https://discussions.apple.com/docs/DOC-2435
    Bear in mind that from April to December 2011 there were only 58 attempted security threats to the Mac - a mere fraction compared to Windows malware:
    http://www.f-secure.com/weblog/archives/00002300.html
    (I have ClamXav set to scan incoming emails, but nothing else.)

  • I apologise in advance if this is not the right forum, but I need to do a reformat on this computer.  My question is, after deactivation of CC, PS, LR and Bridge do I need to uninstall them as well?

    I apologise in advance if this is not the right forum, but I need to do a reformat on this computer.  My question is, after deactivation of CC, PS, LR and Bridge do I need to uninstall them as well?

    If you are going to reformat the hard drive, wiping out all data on the computer, there is no need to uninstall.  Deactivation is enough.

  • Cant find the right forum for this but can i restore my hd from time mch to a year ago and then restore individual files such as logic lprojects that are on same time mchne backup from last week?

    cant find the right forum for this but as i am having problems booting my macbook pro, keep having to reser pram etc and now wont boot at all.....
    aill this theoretically work?
    a. Restore entire macpro hard drive from time machine to a time over a year ago before problems started
    b. Restore more recent individual files such as logic projects individually from same time machine backup
    c. install any programs manually again only couple of vsts
    please answer direct question as i have tried everything else and nonhardware problems just will no longer boot after months of reseting each time
    cheers

    oops.  typo:  "I went ahead and befored the restore."  should be... I went ahead and performed the restore.

Maybe you are looking for

  • Error while accessing WebServices from remote Server

    Hi Friends, I am trying to access webservice located on a remote server.But I am getting the following eror... stackTrace -*- java.lang.NullPointerException      at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1396)      at

  • How to restore HP factory defaults without system restore Dvds if Win7 is formatted?

    I recently encountered a problem with pre-installed win7 in HP Pavilion Dv6 6121se laptop after replacing the old battery. The hard disk had three partitions: C, D & E. By default the windows was installed on C drive. The following operations were pe

  • Can't open or move file - In use by Mac OS X

    I have a file (movie) I am trying to move to a new external hard drive. I can't move it cause it says it is used by Mac OS X and cannot be moved or if I try to open it says it can't be opened. The permissions are set correctly on this file and it pla

  • N97 Mini - TAGs in Music Library

    Hello,    when I rip and store my CDs in my PC with Ovi Media Player everything's fine, as I see them tagged correctly; then I transfer my music files into the phone (with Ovi Media Player or Ovi Suite) and many of them miss their TAG, showing "Unkno

  • Duplication of vendor reference No

    Dear Sir,          I am using SAP B1 2005B Patch 38. For diffrent vendor their can be same vendor reference number.But after enabling the setting in the Document settings-> purchase order->When duplicated vendor reference no.->Block option. This bloc