Issue of GUI easy Java Please Help!

Help, please! whenever I try to run this code:

package here;

import java.awt.Graphics;
import java.awt.Color;
MPort javax.swing.JFrame;


SerializableAttribute public class Window extends JFrame {}
public Window() {}

setVisible (true);
setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
setResizable (false);
setSize (500,500);

}

{} public void paint (Graphics g)
g.drawString ("Hello!", 75, 75);
}

Public Shared Sub main (String [] args) {}
New Window();

}
}

This keeps happening http://www.youtube.com/watch?v=k7htCX6a4BI & feature = watch_response

(I didn't post this video but looks like I'm not the only one that this has happened)

It's like I have a weird screenshot :/
I tried to adjust the color of bacgkround and I tried to use netbeans instead of the eclipse. none worked.

Any help would be really great! I don't want to discourage you to learn java!

First of all, it contains a syntax error.
Call the super paint method trying to override the paint method.

package here;

import java.awt.Graphics;
import java.awt.Color;
to import javax.swing.JFrame;

SerializableAttribute public class Window extends JFrame {}
public Window() {}

setVisible (true);
setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
setResizable (false);
setSize (500,500);

}

{} public void paint (Graphics g)
first call the paint method
Super.Paint (g);

g.drawString ("Hello!", 75, 75);
}

Public Shared Sub main (String [] args) {}
New Window();

}
}

Published by: VID on March 31, 2012 05:05

Tags: Java

Similar Questions

  • Question main method in java, please help

    Guys I looked everywhere on the internet and can not understand one of these questions: I would appreciate any help on them. Is the first and most important thing I would like to know, which is static: what is a static int or a static method of hand? Why is this necessary, and what is its role? Could you please give an example? Also, why String [] args is necessary within the parameters of the main method? Is it so that it can run it? Last thing: objects. Where can I learn about them? I know that they are made with the new operator, but do not include their use? Could you explain why they are useful? You can give them values? and how they relate to the operator point? Once these are answered, I will be so happy because I feel like I am actually somewhat familiar. Right now I'm just confused... Thank you so, so much in advance!

    Is the first and most important thing I would like to know, what is static

    "static" means that the element is associated with the class itself rather than an instance: so it is accessible to all instances.

    Could you please give an example?

    public static void main(String[] args)
    

    is an example, but you already knew that. I don't really understand the question.

    Also, why String [] args is necessary within the parameters of the main method?

    'args' receives the arguments that you type on the command line after the class name or jar, depending on how you call the application.

    It is all covered in the documentation, which you should read before you ask more questions.

    Last thing: objects. Where can I learn about them?

    If you don't know about objects you do not learn about them by asking questions on a forum. It's much too big a subject. You get a book.

  • SWF to gif issues... URGENT, PLEASE HELP!

    Hey guys!

    Well, I have this problem and I can't find a solution and a client is eager this back now...

    So I provided a html wrapper and .swf file. With the demand that he could get a gif to put on the site. So I have no thought, no problem! I tried:

    stick to a scene in flash... It wouldn't recognize/open the file.

    And using a few different types of converters 'swf into gif. They also seem to recognize/open the file.

    So I tried using a different .swf file that I have. But all the same issues that happened.

    Can anyone suggest why this is happening, and if there is a solution?

    I am running flash cc. I can't tell you what version the .swf is made in I'm afraid

    Thanks for your help!

    Google around a SWF to video (MOV / AVI / etc) converter. Take the film he creates in any video software you have and you export a GIF animation sequence.

    For example, the first export options:

  • VMware VC 5.5 first issue of permission to connect, please help

    Also, vsphere 5.1 from the SSO is required to connect.

    In vSPhere 5.1 it is administrator@system-domain

    5.5 the user name is: [email protected]

    PLEASE CONSIDER the ASSIGNMENT any USEFUL or GOOD answer. Thank you!!

  • the library exposed interface. Expert Java please help.

    Hi all.

    Excuse my noobishness once more, but I have a design-oriented question.

    I want to offer some features of other applications via library.

    But want to restrict the user from this library to only a set limited features.

    (1) is there a way of only a set of classes (obviously public) to be exposed to the user?

    For example, let's say we have 2 classes:

    public class ExposedFunctionality
    {
     private HiddenFunctionality hf = new HiddenFunctionality();
     public void useMe()
     {
       // do something
     }
    }
    
    public class HiddenFunctionality
    {
    // ... some meat
    }
    

    (2) how to hide the HiddenFunctionality of the user of the library?

    Thank you

    Also, if you want higher levels of functionality, you can use the CodeSigningKey to do certain functions, classes, etc. limited. I use this to limit what applications can read data that is generated by my applications. The only thing I'd be suspicious of OS5.0 is (and I think that 4.7) If you place a CodeSigningKey on a file, even the operating system cannot read from the file and the default FileExplorer will often hang (sometimes mometarily... sometimes a few minutes) in a directory where it is a signed file.

  • Google Drive is invite you to install download folder based on Java applet fails permanently, Firefox and Java are the two latest enabled, please help.

    I am using Google Drive through my account gmail on Firefox.

    When I click on the button transfer my only option is to 'enable the download of folder... '. ", I click on that and get this message," download folder activate your browser does not support the download of entire folders. " We recommend that you use the Chrome browser instead, which supports file downloading. You can also install an applet to Upload folder based on Java in your browser. »
    I also have the option 'Download Chrome' or 'Applet install', and when I click on install applet, the message "Failed to install Java Applet" appears after a few seconds.

    I'm on OS X 10.8.5, the two Firefox and Java are the last activated version. I went in the Java settings in system preferences and made sure it was "enabled", I deleted the folder for temporary files as well, I also deleted from my history in Firefox and cookies, cache and restarted.

    I don't know what else to do, please help, I do not want to install Chrome.
    Thank you
    N

    I think I know what is happening.

    Please try these steps:

    Let us know if that fixes the problem.

  • I forgot my secret question, answer and the second email but I have the password of my ID Apple and my phone number. I want to receive by email for my secret to my Apple ID issue because it is a gmail account. Please help me

    I forgot my secret question, answer and the second email but I have the password of my ID Apple and my phone number. I want to receive by email for my secret to my Apple ID issue because it is a gmail account. Please help me

    You have to ask Apple to reset your security questions. To do this, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.


    (139026)

  • I can't install my install my java because I get this message that says that my windows install is not properly installed.please help

    I can't install my install my java because I get this message that says that my windows install is not properly installed.please help.

    Hello

    ·        You did changes to the computer before the show?

    ·        It happens only with the installation of java or with each facility?

    Problems installing and uninstalling programs on Windows computers

    http://support.Microsoft.com/kb/2438651

    Note: extend the question to the Windows Installer and try the steps.

  • When I download java comes up with error 25099 decompression of files has failed Please help

    WHEN I DOWNLOAD JAVA ERROR HAPPENS 25099 FILE DECOMPRESSION FAILED PLEASE HELP

    Hello

    You get this error message when you download java or installing it?

    Read the following article that may help you.
    Error: 25099 during Java installation
    http://www.Java.com/en/download/help/error_25099.XML

  • Java download the file is damaged, please help

    When I try to install the latest version of java, I get the message "Download file C:/Users/Derek/AppData/Locallow/Sun/Java/jre1.6.0_21/jre1.6.0_21-c-l.msi is corrupt" I tried redownloading the file again and I still get the same message, I'm out of ideas, please help.

    Thanks for your help, I tried your solution and unfortunately it did not work.  I went on the website and it wasn't much of a help either.  However, I found the solution to my problem!  I don't know if this would be the same for everyone, but when I went to download the latest version of Java once more on the site, I clicked "RUN" instead of "SAVE", after it's over, I installed the download and it was not the mistake bad guy who kept occurring. : D

  • Blue screen issue whenever I use the Torrent Client Please Help!

    Hello...

    Everything was ok, all of a sudden, I continue to receive the Bluescreens he said netio.sys caused the Bsod!...
    It occurs only when I try to use the Torrent Client (Utorrent, Bittorrent).
    I tried to update the network drivers, but could not find new ones on the dell support Web page.
    Please help me solve the problem.
    Run Dell Inspirion 15r N5110
    Intel i5 processor
    4 GB Ram DDR3
    GPU NVIDIA 525 m

    Update : I was surfing for some corrections. I came across this link (http://www.troublefixers.com/utorrent-crashes-windows-7-with-blue-screen-of-death/)

    I asked he'll keep this post updated.
    UPDATE 2 : link above the fixed Solution! : D

    Steps to disable Teredo

    Step 1: On the start menu, search cmd, Windows locate the cmd.exe which is the prompt, right click above and clock on run as administrator.

    Step 2: On the command prompt, type the following command and press enter

    netsh interface set disabled state Teredo

    This is it, its done. Hope you find the above easy to follow trick.

  • Hello, I bought a monthly license paid for indesign last night and I do not understand how to play with it? When I opened the window of creative cloud, they suggested me to buy indesign (but I bought it already...) Please, help me... It's easy to al amend

    Hello, I bought a monthly license paid for indesign last night and I do not understand how to play with it? When I opened the window of creative cloud, they suggested me to buy indesign (but I bought it already...) Please, help me... This is our easy to understand for beginners like me at all

    FAQ: What should I do if I have a subscription, but my application acts as if I had a trial?

    https://forums.Adobe.com/thread/1962238

    Download/install the desktop application, connect and install applications subscription.

    https://helpx.Adobe.com/creative-cloud/help/download-install-app.html

    Creative cloud to desktop

    https://helpx.Adobe.com/creative-cloud/help/creative-cloud-desktop.html

    Sign out, sign in | Creative office cloud app

    http://helpx.Adobe.com/creative-cloud/KB/sign-in-out-creative-cloud-desktop-app.html

    Install, update, or uninstall applications

    http://helpx.Adobe.com/creative-cloud/help/install-apps.html

  • I keep trying to download, but I always get a message saying ' we are currently experiencing some issues, please try again later. "Please help

    I tried to download after effects CC but it always says "that we are currently experiencing some issues, please try again later." I did this for about four days now, to no success. I use a dell computer please help me, I really want this app.

    Hi Henrique,

    Versions of Adobe Premiere Pro and Adobe After Effects CS5 and later Windows require a 64-bit (Windows XP) with the exception of Windows edition. You can not install (or run) of the Adobe Premiere Pro or After Effects on any of the following operating systems:

    • 32-bit editions and 64-bit of Windows XP Edition family or professional
    • Editions 32-bit of Windows Vista Home Basic, Home Premium, Business, Ultimate or Enterprise
    • 32-bit editions of Windows 7 Starter, Home Premium, professional, or Intel equipped computers UltimateMac
    • Mac computers with Core Solo or Duo 32-bit processors. To indicate if your Mac offers 64-bit support, see how know if your Mac has a 32-bit processor or 64-bit Intel processor.

    For a specific system configuration, see the following pages: Adobe Premiere Pro | After Effects

    Kind regards

    Rahul

  • Please help me to download the 13 elements, I all relevant issues and have tried several times but without success.

    PLEASE HELP ME TO DOWNLOAD ITEMS 13, I ALL RELEVANT ISSUES AND HAVE TRIED SEVERAL TIMES.

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If he continues to not try to use a different browser.

    PES 10, 11, 12, 13 - https://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-downloads.html

    PE 10, 11, 12, 13 - https://helpx.adobe.com/premiere-elements/kb/premiere-elements-downloads.html

    You can also download the demo version of the software through the page linked below and then use your current serial number to activate it.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    Photoshop/Premiere Elements 13: http://prodesigntools.com/photoshop-elements-13-direct-download-links-premiere.html

  • Yosemite & CS5 & Java - someone please help me...

    21/02/2015

    MacBook Pro with Yosemite 10.10.2 & Photoshop CS5.

    CS5 does not load.

    When I click on CS5 I get error "you must install the Java SE 6 Runtime inheritance."

    I went to Java and installed the most recent Java. (SE 6 not an option)

    CS5 will still not charge.

    My CS5 is more compatible?  Can I reinstall CS5? If so, how?

    I can't really afford to lose my CS5. I paid a lot and almost began to learn the program.

    I'm just learning so please help me if you can,

    Thank you.

    You need this one: Java for OS X 2014-001

    Download and install and you will be fine.

    Let us know if there is something else.

Maybe you are looking for

  • Satellite U940 - battery problem

    Hi, my battery LED doesn't turn on when it is plugged. My laptop is plugged in but does not support. AC adapter works fine. Is this a battery problem? Do I have to buy a new battery?

  • Tecra M4 - 150 3.50 BIOS problem with USB

    Hello I've updated my Tecra M4 with the latest version of the BIOS and I have the following problems so far:1. controls on the Logitech V20 speakers don't work anymore (they work with other computers is not hardware failure).2 setpoint application ta

  • Random freeze and automatic restart

    I have a Dell Inspiron 1521 with windows vista that I bought about 2 years ago. Since I got it, it was freezing when loading, either on the screen, the opening of the office, or even in full me work on something load. It also randomly restarts itself

  • HP pavilion g6 2242sa USB 3.0 driver for Win 7 64 bit

    Dear Sir. I have a problem for USB 3.0 my computer. It does not work, and I do not have a driver that is perfect from the HP website. It's a HP Pavilion computer 2242sa g6 and I have a Windows 7 64-bit operating system. Please help me.Thank you to fo

  • HP 15-r000na Notebook PC: HP15-r000na drivers for network controller

    Dear HP Please help me with drivers for the network controller (WIFI drivers) I tried to install drivers driver page, but it is always showing me that this driver is not working Maybe I have the wrong driver? Please help