How can I initial a Graphics

I create a class with a graphics function within and in an applet class I try to call the function but the compiler looking for an initial of Graphics g. How can I inittial the Graphics in order to call my graphics function to do some garphics?
public void Draw(Graphics g)
g.drawLine(x1,y1,x2,y2);
public void Draw(Graphics g)
g.drawLine(x1,y1,x2,y2);
public void Draw(Graphics g)
g.drawLine(x1,y1,x2,y2);

Hi !
Use this method in ur Applet and do any graphical operations instead of the draw() method. I hope this helps u ...
public void paint(Graphics g){
Regards,
Vin

Similar Messages

  • I've installed bootcamp 4.0 on my iMac 27. Everything works superb, but for playing need for speed run or battlefield 3 I need catalyst driver 11.7 or higher. How can I update my graphics? Is there a possibility except waiting for a new bootcamp version?

    I've installed bootcamp 4.0 on my iMac 27. Everything works superb, but for playing need for speed run or battlefield 3 I need catalyst driver 11.7 or higher. How can I update my graphics? Is there a possibility except waiting for a new bootcamp version?

    But how do you install the drivers if Bootcamp is running interference?
    Bottom line, I'ev tried to install three different versions of updated ATI driver sover the last few momnths and on each and every occassion have ended up with the original Bootcamp driver. A number of current games are unplayable on a Mac running Bootcamp as a result.
    And if I can't run the software I want, then Bootcamp is as useless as boobs on a bull.

  • How can I measure the Graphics Card usage? I.e. percent load

    Hello,
    How can I measure the Graphics Card usage, like with the processor in Task Manager, but instead giving a percentage usage for the graphics card instead? Is there an easy way to do this, or would it require a lot of code? Is it even possible?

    Ah, so It's unlikely that Java3D will include anything for reading this data then? I was really aiming at measuring the GPU usage under this API which although i have limited knowledge using, I do at least have some knowledge - I wouldn't have a clue how to access any other API's!
    I'm using an NVidia TNT2 card at the moment, which is quite old.

  • How can I make a graphic (scatter chart) with 1 "y", but multiple "x" (to make a multiple linear regression)?

    how can I make a graphic (scatter chart) with 1 "y", but multiple "x" (to make a multiple linear regression)?

    Émilie,
    The default for X-Y Charts is for X values not to be shared, so it's entirely possible for you to create X-Y pair sets that have common Y-values and independent X-values.
    This answer assumes, as always, that I properly interpreted your problem statement. A linear fit line for each pair set should satisfy.
    Jerry

  • How can I load a graphic in SOFFCONT1 into an SAP picture control?

    At my customer site, GOS attachments to PM notifications are stored in SOFFCONT1, so I can't use cl_bds_document_set to get a URL that I can pass to the load method of the SAP picture control.
    How can I load the actual graphic in SOFFCONT1 into an SAP picture control?
    Or do I have to configure IW22 so it stores in BDS content servers, not SOFFCONT1?
    If this is the case, how do configure IW22 so GOS knows to store attachments as BDS documents rather than in SOFFCONT1 ???
    Thanks
    djh

    This explains how to make sure your PC and bin documents are saved on your HTTP content server, instead of in the database:
    http://help.sap.com/saphelp_nw04/helpdata/en/c0/1aca5823ee11d3a2db00a0c943858e/content.htm

  • How can i boost my graphics for gaming?

    I have a winter 2013 macbook pro with a 2.9GHZ i7, 8GB 1600 MHz DDR3 memory, Intel HD Graphics 4000 512 MB, running OS X 10.8.2 (12c3012) how can i boost this for gaming...is this good for gaming? could i play games like call of duty with this?

    goose-hunter wrote:
    so do you think runniong black ops 2 would be ok...this is not a gaming PC but i already dropped some coin to have a powerful macbook for work. i figure might as well be able to game a bit on it too..
    The 13" is not a gaming computer, despite Apple packaging the 13" along with the other MacBook Pro's.
    You'll have to check the specs of the games at the developers sites, however the minmal requirement is 99% of the time unsatisfactory as updates etc come out.
    Apple used to have that 13" type of machine as a MacBook, then introduced the iPad and moved the MacBook onto the MacBook Pro's as a 13" model, then removed the 17" MacBook Pro.
    So you see the shuffling around going on there as consumers in general are opting for the iPad instead than laptops.
    Forget about 3D gaming on Mac's, it's future is very bleak indeed as more people are opting for the 3D less iPads with their "fake 3D" which is 2D images made to look like it's 3D.
    3D GPU's generate a lot of heat, thus are unsuitable for iPads, and with the rise of dedicated consoles, makes them a better choice for 3 D gaming for most.
    The hardcore 3D PC gamers are on Windows machines for it's longevity between OS cycles, hardware customizing and software tweaking ability.

  • [p7-1240] How can I tell which graphics cards will work with my motherboard?

    I recently went through the nightmare of trying to install a Gigabyte GTX 650 in my PC. After a few days of struggling and scouring the internet for answers, I discovered that it is incompatible with the BIOS on my motherboard, and HP does not offer BIOS updates. I returned the card and am now looking for a new one, but I am unsure of which cards will work now, since my computer met all of the system requirements for the graphics card, and It stil ldid not work. Since GPU manufacturers do not list BIOS specs under system requirements, how can I tell if a graphics card will work with my sytem?
    My computer is a p7-1240 with an upgraded 520W PSU and approximeately 11" of room to install the card.
    This question was solved.
    View Solution.

    Thexn, welcome to the forum.
    The problem is, many of the newer video cards require the computer to have a full UEFI BIOS.  HP began using one in mid-October, 2012.  Before this date the BIOS is Legacy.  This is why the video card didn't work with your computer.
    I don't know what you want to spend for a card, but MSI makes a GTX 750ti that has a hybrid VBIOS.  It has a switch to change to Legacy or UEFI.  There is a video link directly below the picture of a card.  Paul from Newegg gives a full description of the card.
    I like EVGA cards the best.  Their Tech Support has given me a lot of information about their cards.  However, you have to go back to a GT 640 card to find one of their cards that doesn't require the UEFI BIOS.  They do have some updates for their BIOS'es that solve the problem, but you have to call them for the exact cards.
    Please click the "Thumbs up + button" if I have helped you and click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • How can I move a graphic ?

    I have two classes set up. One of them has the graphic sitting in teh center of the panel, while the other class sets up the menu and action listener things. In one of the menu items I have four options, up, down, left, and right. How can I make it so when I select one of them, it moves the graphic X number of pixels in the corresponding direction? I am having trouble with the action listener things I guess.. Any help?
    Thanks.

    import javax.swing.*;
    import java.awt.*;
    public class ColorPanel extends JPanel
    {   private int x;
        private int y;
        ColorPanel(int vertical, int horizontal)
            setPreferredSize(new Dimension(300,300));
            setBackground(Color.white);
            x = horizontal;
            y = vertical;
        public void paintComponent (Graphics g)
            super.paintComponent(g);
            g.setColor(Color.black);
            g.drawRect(0, 0, 50, 50);
            g.drawString("Goal", 10, 30);
            g.fillOval(x, y, 10, 10);
    }and
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ColorFrame extends JFrame
    {   private int x;
        private int y;
        ColorFrame()
        {   int origx=150; int origy=150;
            panel = new ColorPanel(x,y);
            getContentPane().add(panel, BorderLayout.CENTER);
            JMenuBar menuBar = new JMenuBar();
            setJMenuBar(menuBar);
            JMenu fileMenu = new JMenu("File");
            menuBar.add(fileMenu);
            fileMenu.add(createMoveItem("Up", x, y+=20));
            fileMenu.add(createMoveItem("Down", x, y-=20));  
            fileMenu.addSeparator();
            fileMenu.add(new ExitItem("Exit"));
            pack();
            setVisible(true);
        public JMenuItem createMoveItem(String label, final int x, final int y)
            JMenuItem item = new JMenuItem(label);
            class MenuItemListener implements ActionListener
                public void actionPerformed (ActionEvent evt)
                    panel.repaint();
            item.addActionListener(new MenuItemListener());
            return item;
        class ExitItem extends JMenuItem implements ActionListener
            ExitItem(String label)
                setText(label);
                addActionListener(this);
            public void actionPerformed (ActionEvent evt)
                System.exit(0);
        private ColorPanel panel;
    }

  • How Can I Fix The Graphics Issue...?

    After having my computer for a few years, it started getting an artifact around the mouse, and when it did that, everything was frozen, key commands didn't work, and I would have to manually shut it down.
    I went to the Apple store, and they couldn't get it to boot, even with their external drive. The guy at the Apple store took my computer into the back, and a few minutes later, brought it out. He said he had gotten it to boot, without their external drive, but wouldn't tell me how. He said there was a problem with my video card. He said $400 to fix it.
    Not having the money, I left. A friend told me how to safe boot the computer, and now it will turn on, despite the artifacts and graphics problems. Why didn't the guy at the store tell me this? It's obviously the only way he could have booted it. He wanted to charge me $50 to back up my data, when I could do it myself under the safe boot.
    The thing is, when using safe boot, I have no audio or video functionality- the camera doesn't work, the speakers don't work, and the disc drive doesn't work. I've read up on this, and it's an issue for a lot of macs, from about the time I bought mine. They say there was too much glue used somewhere in the computer (2 or 3 little chips with too much glue or something), and over time the glue/ adhesive gets too hot, and spreads to other areas and ruins them (ie. my graphics card). That's my simplified understanding of the issue, anyway.
    Why won't Apple replace it for me? They won't let me trade it in, because it won't boot right, but this is an issue they were aware of at some point. I spent a lot of money on this laptop and it's really nothing more than a digital typewriter now.
    Does anyone know how I can fix the graphics issue? Aside from shelling out the money I don't have for something that's really Apple's fault? It'd be really nice to be able to, I don't know, watch things and listen to things. That was the whole reason I got this thing.
    Thanks for any ideas, feedback, sympathy, empathy or other comments.
    <Edited by Moderator>

    Ok, you are right, maybe I don't know it for a fact . . . but from all the things I read in various forums, there was a batch (or something similar) of macs (the exact kind I have) that did have too much glue on some parts, and it caused all sorts of problems for different people, most of those problems being with the graphics card. Apparently the excess glue overheats and leaks out of where it's supposed to stay, and whatever it has the misfortune of getting on goes to pot.
    I got very brave, thinking my computer was shot- I opened it, and there was, indeed, crusty glue coming out from under some ... things ... three square chip like things ... and it had seeped onto the edges my graphics card. Having seen the inside of other laptops, I know it was not supposed to look like that no matter how old it is.
    This whole issue happened just a few months after my (overpriced, unused) AppleCare expired. Irony?
    I did backup all my data and files (no thanks to the Apple people; and on safe boot the disc drive won't work, so I had to borrow my friend's external hard drive for backing up), and did a clean install with the original discs. It was a huge hassle, and when it was finally done, I booted my computer normally. It worked for about 10 minutes before it got artifacts all over and froze, at which point I had to force shut it down. I've tried the clean reinstall a few times, but the problem (I think) is that the glue inside already did the damage, and my graphics card is shot. So, I've been running it on safe boot for months. No music. No video. No disc drive. OH- and the best part- on safe boot, the airport won't work. I can't use wi-fi, and I can't take my laptop anywhere because I'm tethered to a modem. It's the worst thing ever. All of it. It's horribly depressing.
    I'm just really frustrated and irritated that this happened, and Apple won't do anything. I do realize they don't HAVE to do anything- buyer beware and whatnot- BUT as a reputable company they should at least let me trade in with the discount or whatever. I didn't have to choose Mac, it was the most expensive computer I looked at- but it has so many awesome functions and things . . . that I can't even use . . .
    As a poor college student I don't have the option to get a new computer or have Apple replace any parts in this one, so I just kind of feel like Apple screwed me over. Their fault? Maybe not. Their product? Yes, so they should want to keep me as a future customer. At least I think so.
    I guess this isn't quite a question. But I would love more feedback, ideas, anything. Has anyone else had this problem? Can I replace my own video card? Will Apple do anything at all? I love macs but I might never get another one, since this could happen again.
    And- unrelated- who changed the title of my post, and how, and why?

  • How can I disable intel graphics? G570

    Hi!
    I have a question like in the topic. I have a Lenovo G570 laptop with Intel HD integrated Graphics and AMD HD 6300M dedicated Graphics. I'm running on Win7.
    I know that a similar topic was before and that the Intel graphic should switch to amd when necessary but I think it's not working right. The problem is with Skyrim. When I run the game's setup it automatically detects the configuration I possess and chooses the graphic options in the game. As You can imagine they are the lowest possible as it ONLY detects my intel graphic. The AMD adapter is not there (the list which appears to choose from does contain the intel only).
    So, is there ANY way to just turn off the intel adapter and work on amd all the time? It would help a lot. I tried that in device manager but when I disable the intel graphics the screen resolution drops rapidly and aero theme from windows is being disabled. It sucks. As if I was forced to use the intel.
    Can anyone help? I would sure appreciate that a lot.
    Thanks!

    Hi Lenssd9,
    If you could tell us what machine type you're using and the operating system we might be able to pinpoint a means of assisting you without too much reconfiguring.
    Be AWESOME Everyday!
    Donate KUDOS and Click "Accepted Solution"
    Did someone help you today?
    Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"
    This will help the rest of the Community with similar issues identify the verified solution and benefit from it.

  • How can I fix this graphics problem on my Macbook Pro?

    Whilst playing numerous games on my Macbook Pro, I have noticed the same problem. This causes the game to be almost unplayable and usually happens after playing the game for a while. I have had this happen on many games such as Portal 2, World of Warcraft, Team Fortress 2, Starcraft II and a few others.
    I have had this problem ever since I first got my Macbook Pro, but the issue has changed slightly since. A software update a long time ago caused the problem from affecting the whole screen to just affecting the window the game was being played in.
    I can sometimes fix the problem by opening the Display preferences in System Preferences and it automatically fixes itself - without me doing anything. There is another way I have found to temporarily fix the problem, however this has only worked on World of Warcraft. It involves changing the reselecting the display in the video settings and reapplying it - causes the game screen to go black for a few seconds and the issue is resolved.
    The problem is that the graphics on the screen start to flicker and move about and certain sections are missed out. It's kind of like a fuzzy tear in the screen.
    I have a attached an image of the worst case of this that I have had (I managed to screenshot it).
    System Specs
      Model Identifier:          MacBookPro7,1
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          2.4 GHz
      Memory:          4 GB
      Chipset Model:          NVIDIA GeForce 320M

    Does it do the same thing if you boot from a different disk, like your old Mac OS X install disk?  I see you're running Lion, so also try booting from the recovery partition by holding down command and r at startup.
    If it can't boot from any system, it's a hardware issue.  You'll need to contact Apple for service.  If you can boot from the recovery partition, try repairing the hard drive with Disk Utility.  You may also want to try running Apple Hardware Test.

  • How can I quickly import graphics between text.

    I want to insert images that subsitute for some of the text within a paragraph. Since there are a lot of them, I don't want to import, place and resize them every time. For instance, For instance, add them to the character designer so I can dimply click on a name I assign to the graphic and have it appear in the paragraph ready to go! Is there a way to do this? On the reference page maybe?

    I believe there are a couple of 3rd party utilities that do this, you might take a look through the Tools search at Leximation,
    http://www.leximation.com
    One in particular that's quite well known is Auto-Text from Silicon Prairie Software, at
    http://www.siliconprairiesoftware.com
    See, too, Lin Sim's list of FM utilities -- a link to the list is on the Microtype site, at
    http://www.microtype.com/links.html

  • How can i swicth between graphics cards

    i have updated to the latest BIOS version- form the menu of nvidia graphic card i cannot select the video player on which graphic card to run- the graphic cards doesn t switch when i watch a movie or work in excel.- if i disable the on board grafic card the laptop runs like it has no graphic card installed- from time to time i have horizontal lines that goes form bottom to the top of the screen- graphic card is Nvidia GT 820M 1 GB. Can anyone help me with these problems?

    Hi, Please try (a) Right click a blank space on desktop,(b) Open NVIDIA Control Panel You can select from the following menu:     Regards.  

  • How can I stream labview graphical data to the internet?

    I am trying to post my graphical results generated on Labview to an external source eg, a web server? I was hoping it was possible to have the webpage outputting the graph as a stream/image at time steps..?
    Any help would be great.
    Thanks!!

    You can publish your LabVIEW front panel showing graph & data with the help web publish tool, which you find under Tools >>> Web Publish Tool in LabVIEW.
    Another way to stream your data through network shared variable, make your application as web service and make web page to recevice that data and show on the web page. 
    CLA 2014
    CCVID 2014

  • How can I change wiki graphics?

    I'd like to change the graphic of the wiki pages. Is it possibile? and where can I find the wiki pages css?
    Thanks
    Giancarlo

    You'd need to look into changing the print.css for the theme you are using, and then I imagine restart the wiki server.

Maybe you are looking for