Graphics display problem need help.

I have a class called "Window" that obviously sets up my window, I also have a class called "IconGen" that should generate an Icon. Both of the class codes are posted below but for some reason I cannot get the graphic to show up in the frame. Can anyone lend a helping hand??
Window code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Window extends JFrame{
     JPanel jp = new JPanel();
     public void setupJFrame(){
          setBackground(Color.gray);
          setSize(200,200);
          setVisible(true);
          addWindowListener     (new WindowAdapter(){
               public void windowClosing(WindowEvent e){
                    System.exit(0);
     public void setupJPanel(){
     jp.setBackground(Color.white);
     getContentPane().add(jp);
     setVisible(true);}
     public static void main(String args[]){
          Window w = new Window();
          IconGen i = new IconGen();
          w.setupJFrame();
          w.setupJPanel();
     w.getContentPane().add(i);
IconGen code:
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class IconGen extends JComponent{
private     Color salmon = new Color(255,128,128);
private     Polygon p = new Polygon();
public Polygon IconGen(){
               int[] x = {75,125,75,25};
               int[] y = {25,75,125,75};
               int pts = 4;
               Polygon p = new Polygon(x,y,pts);
     return(p);
public void paint(Graphics g){
               super.paint(g);
               g.setColor(salmon);
               g.translate(15,15);
               g.fillPolygon(p);
}

Hi the constructor of IconGen looks like a problem, and it should subclass JPanel not JComponent.
Here's a working example:
import java.awt.*;
import javax.swing.*;
public class TestFrame extends javax.swing.JFrame {
/** Creates new form TestFrame */
public TestFrame() {
initComponents();
this.getContentPane().add(new MyIcon());
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
private void initComponents() {
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
pack();
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
* @param args the command line arguments
public static void main(String args[]) {
new TestFrame().show();
// Variables declaration - do not modify
// End of variables declaration
class MyIcon extends JPanel{
Color salmon = new Color(255,128,128);
int[] x = {75,125,75,25};
int[] y = {25,75,125,75};
int pts = 4;
Polygon p = new Polygon(x,y,pts);
public void paint(Graphics g){
g.setColor(salmon);
g.fillPolygon(p);

Similar Messages

  • Graphics display problems (dialog boxes) Lenovo G50 AMD A6 Win 8.1

    Graphics display problems Lenovo G50 AMD A6 Win 8.1 Greetings to all. After having spent a number of days trying to find a solution to a display problem, I turn to this forum for help. I own a Lenovo G50 AMD A6 Win 8.1 ever since November 2014, and have had display problems ever since the first day, be it while using internet (Firefox or Explorer) or various software (Text editors, etc.). Many dialog boxes, including colour settings and controls (open, close etc.) either have an inappropriate appearance or even do not appear at all! I manage to "click" on the right places using memory: most areas are INVISIBLE! Another example would be that I do not see any backround colour or image on most webpages such as this one).  Some suggestions included checking for graphics updates (but the drivers used were already up-to-date).  I 'd be most obliged for any new suggestions. Thank you very much. George

    Greetings to all, I finally decided to express my utmost discontent with- the Lenovo G50-45 I bought before Christmas 2014,- the summary response with inappropriate links that I received after exposing  my problem- the fact that I tried to dowload the following graphics driver  (Beema) AMD Driver (VGA, HDAudio, SATA) for Windows 8.1 (64-bit)
    exe
    526 MB
    Windows 8.1 (64-bit)
    VGA V14.502.1002.1002-Logo'd_HDAudio v9.0.0.9905_SATA v1.3.1.220;VGA v13.302.1601.1001_HDAudio v9.0.0.9905_SATA v1.3.1.220
    3/19/2015from here(http://support.lenovo.com/fr/fr/products/laptops-and-netbooks/lenovo-g-series-laptops/g50-45-notebook-lenovo/downloads/DS100174), and after REFUSING to accept cookies and some "Lenovo Service Bridge", finally managed to obtain something  HERE(http://www.notebookcheck.net/Lenovo-IdeaPad-G50-45-Notebook-Review-Update.125641.0.html).  I find it quite disrespectful to NOT provide customers with EASY support, as well as avoiding to  answer their requests for further help when some simplistic "assistance" that one can find almost anywhere on the web leads to no further solution. I shall not repeat the problems I have faced till now: vide supra. The problem, however,  is NOT just with browsers.I simply cannot see any dialog box content and colour in MANY software programs, such as OPEN OFFICE; for instance:  PRESENTATION colour dialog boxes show BLANK squares instead of squares filled with different colours. This has occured AVER SINCE DAY ONE! Finally, a new bug has appeared: Windows 8.1 keeps popping up some email program to which I am invited to register - I never created a Windows email account, and certainly don't intend to do so.NOR shall I accept some "Lenovo Service Bridge", however "discreet and inoffensive" it might be. I don't know if there are any legal grounds for customers to complain for all these problems. I DO know, however, that I shall NEVER buy a LENOVO device ever again. The pricing and processor might be competitive => yet,  the support that ensues is, as far as I'm concerned, LAMENTABLE. To make a presentation, I have to switch to a Samsung R20 using XP..... What is the meaning of all this? George    

  • LCD monitor display issue, need help

    I have a strange problem with my LCD display, it goes like this:
    When I first boot up the mac and the wallpaper appears on the display the image looks perfect, all the tones are right etc, but as the startup progresses, programs loading etc, the display changes suddenly, becomes too bright in the highs, too dark in the lows, and over-saturated in between. Its looks horrible.
    I have just discovered that I can correct the issue by going into system prefs, display, selecting the options tab (next to Display and Color) and turning overscan on, then back off, voila, all fixed.
    Looks great.
    Thing is I have to do this every time now that I start the computer, and Im wondering if anyone knows what causes this issue and if theres anything I can do as a more robust solution.
    The kicker is I have the same problem with a viewsonic LCD on my secondary machine (Powermac G5, Osx 10.4), right at the beginning of startup it looks great then suddenly all goes wrong, too dark/light over-saturated. Its as if the image has been blended with itself in multiply mode a la photoshop.
    And on my second machine there is no option for overscan so I cant use my quick fix.
    Is overscan a feature of the OS or the monitor?
    The worst part is I need these displays to work correctly because Im a graphic designer, I need my colors to look right so I can do my job, and while I could go buy a $1000 monitor its not possible atm, and Id kinda like to know why this problem occurs. So if I do buy a different I can be assured the problem wont rear its ugly head again. But I dont think the problme is the monitor. I think its something to do with the communication between the display and the computer.
    The monitor can display correctly, and does for a brief moment, then it all goes very wrong. Ive spoken to NEC and they werent much help but Ill be trying them again today too.
    But again, I thinks its the computer, not the monitors as I can reproduce the issue swapping out monitors.
    I hope Ive described it adequately,
    Thanks in advance for any help forthcoming, this is very frustrating and is causing me endless headaches.

    Mattdp,
    I am currently having the same problem with my 20" cinema display. Did you ever find a long term solution? Apple states that the PowerMac G5 is legacy with no support available, and suggested a reset the PRAM. I did so to no avail. I too have 10.4.11 and thus no "overscan" to turn off. This is my wife's primary computer for her photography business, and the color issue needs to be resolved as quickly as I can find the answer.
    Is there a possible solution through the terminal?
    Rick

  • Display problem - need advise

    Hi everyone,
    I have a problem with the display of my MBP. It's a 15" Glossy LED (June 2007). It happens heretically about a couple of time per week, sometimes less, sometimes more.
    When I open the lid to wack it back from sleep, I have sometimes the display that have a sort of flickering artifact (see picture 1). Then, after 5 or 10 secs like this, the screen goes like picture 2: a mess of grey patterns. But it also happens that it goes directly into 'pic #2 mode'. On a external display, I don't have any problem. And it happens quasi exclusively when I'm on battery.
    pic #1: http://tof.canardpc.com/show/734706b9-3945-4dbb-8626-f3aa06c56e04.html
    pic #2: http://tof.canardpc.com/show/54c3b309-586b-404a-a742-6197b16a0570.html
    I have done a RMA on it to a Apple Premium Reseller (no Apple store here in Belgium). They tried to gave me an estimation on what it will cost to me and they couldn't reproduce this problem, so they guessed based on my pictures that it should be the screen that needs replacement. But they can't be sure and if this problem occurs again after the 3 months repair garanty, then, bad luck, all extra repair will be at my own expenses.
    So, what I basically want to know is if there is someone who had the same problem and if a accurate diagnosis has been done.
    Many thanks for your help.

    Welcome to Apple Discussions!
    If you never have the problem on an external display, that does imply that the problem, whatever it is, lies with the internal display. If the problem were caused by the NVIDIA chip problem, then you would also expect to see the same artifacts on the external. You might want to check anyway to see if you have the NVIDIA chip:
    http://support.apple.com/kb/TS2377
    This problem can be intermittent, so you need to be sure that your graphics artifact never shows up on the external display. If it ever does, then you have a graphics chip problem rather than a display problem.
    It sounds like the reseller may just be guessing as to what the problem might be. Is there any way you could send your Mac directly to Apple for diagnosis? It also seems that a display replacement should be good for more than 90 days. I'm wondering if there is any one else--maybe an Apple authorized repair service--who could do an actual diagnosis. Display replacement is quite expensive--I would want to be sure that the display was indeed the problem and not the graphics chip. If it were to turn out to be the graphics chip, then according to the article, Apple would do the repair free of charge.
    Good luck!

  • Zen Vision:M problem, NEED HELP!

    My zen vision:m is starting to run slowly. It started right after my player froze and i reset it.Now its really slow and barely even switches screens sometimes.Right now its just a black screen with the keypad lit up.Whats wrong with it'sI NEED HELP!

    johnnnyp wrote:
    hi, i have a problem with my creative vision m. i wanted to watch a movie and it froze. i tried to shut it down but it wouldnt respond, and now is frozen. please help me if you can!
    You know its kinda rude to derail XBenzinoFla thread with your own problems, make your own thread next time.
    But to the both of you especially XBenzinoFla, try putting your ZVM in rescue mode and run scan disk to see if it hel
    ps.

  • Zen Micro problem need help

    Today i was listening to music and my zen micro just froze while playing and no buttons could be pressed and the lock button wasnt on. So i took the battery out and rebooted the player but it froze at the creative screen. I went home and i went to recovery mode and tried to reload the firmware but it said erasing firmware for more than 2 hours. So then i tried a format but it said formating for the same amount of time. I need help please. Also, recently i've had problems witht the headphone jack. When ever i would stick it in it would sound distorted and i would have to move it around until i got it to a certain spot to hear it good again. If anyone else has this problem please tell me. One more thing i had returned my other micro zen in for hard dri've probems and this was my new one do u think if i have to return in (hopefully not) that they would accept it.

    If the functions in Rescue Mode aren't working properly then you need to contact Creative Support.

  • Still stuck with the same old producer consumer weight problem need help

    Hello All,
    This is the problem I am stuck with right now.
    I have two array lists one producer array list and one consumer array list denoted by a and b
    P1 P2 P3 P4 P5
    5 6 7 8 9
    C1 C2 C3 C4 C5
    2 3 4 5 6
    Now we find all those producer consumer pairs which satisfy the criteria Pi>=Ci
    We have the following sets
    (5,2)(6,2)(7,2),(8,2),(9,2)
    (5,3)(6,3)(7,3),(8,3),(9,3)
    (5,4)(6,4)(7,4),(8,4),(9,4)
    (5,5)(6,5)(7,5),(8,5),(9,5)
    (6,6)(7,6)(8,6),(9,6)
    Let us done each of them with Si
    so we have S1,S2,S3,S4,S5
    we assign a third parameter called weight to each element in Si which has satisfied the condition Pi>=Ci;
    so we we will have
    (5,2,ai),(6,2,bi),(7,2,ci)....etc for S1
    similarly for S2 and so on.
    We need to find in each set Si the the pair which has the smallest weight.
    if we have (5,2,3) and (6,2,4) then 5,2,3 should be chosen.We should make sure that there is only one pair in every set which is finally chosen on the basis of weight.
    Suppose we get a pair (5,2,3) in S1 and (5,2,3) in S2 we should see that (5,2,3) is not used to compare to compare with any other elements in the same set S2,
    Finally we should arrive at the best element pair in each set.They should be non repeating in other sets.
    Given a problem
    P0 P1 P2 P3 P4
    9 5 2 2 8
    6 5 4 5 3
    C0 C1 C2 C3 C4
    we have So as (P0,C0) and (P4,C0)
    assuming that the one with the smaller index has lesser weight PO is selected.In the program I have used random weights.from set S1 we select the pair PO,CO
    S1 =(P0,C1),(P1,C1) and (P4,C1)
    since P0 and P4 are already used in previous set we dont use them for checking in S1 so we have (P1,C1) as best.
    S2=(P0,C2),(P1,C2) and (P4,C2) so we dont use P0,C2 and P1 and C2 because PO and P1 are already used in S1.
    So we choose P4,C2
    in S3 and S4 ae have (P0,C3),(P1,C3),(P4,C3) so we dont choose anything
    and same in S4 also.
    So answer is
    (P0,C0),(P1,C1) and (P4,C2).
    My program is trying to assign weights and I am trying to print the weights along with the sets.It doesnt work fine.I need help to write this program to do this.
    Thanks.
    Regards.
    NP
    What I have tried till now.
    I have one more question could you help me with this.
    I have an array list of this form.
    package mypackage1;
    import java.util.*;
    public class DD
    private  int P;
    private  int C;
    private int weight;
    public void set_p(int P1)
    P=P1;
    public void set_c(int C1)
    C=C1;
    public void set_weight(int W1)
    weight=W1;
    public int get_p()
    return P;
    public int get_c()
    return C;
    public int get_x()
    return weight;
    public static void main(String args[])
    ArrayList a=new ArrayList();
    ArrayList min_weights_int=new ArrayList();
    ArrayList rows=new ArrayList();
    ArrayList temp=new ArrayList();
    Hashtable h=new Hashtable();
    String v;
    int o=0;
    DD[] d=new DD[5];
    for(int i=0;i<4;i++)
    d=new DD();
    for(int i=0;i<4;i++)
    d[i].set_p(((int)(StrictMath.random()*10 + 1)));
    d[i].set_c((int)(StrictMath.random()*10 + 1));
    d[i].set_weight(0);
    System.out.println("Producers");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_p());
    System.out.println("Consumers");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_c());
    System.out.println("Weights");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_x());
    for(int i=0;i<4;i++ )
    int bi =d[i].get_c();
    ArrayList row=new ArrayList();
    for(int j=0;j<4;j++)
    if( d[j].get_p() >=bi)
    d[j].set_weight((int)(StrictMath.random()*10 + 1));
    row.add("(" + bi + "," + d[j].get_p() + "," +d[j].get_x() + ")");
    else
    d[j].set_weight(0);
    row.add("null");
    rows.add(row);
    System.out.println(rows);
    int f=0;
    for(Iterator p=rows.iterator();p.hasNext();)
    temp=(ArrayList)p.next();
    String S="S" +f;
    h.put(S,temp);
    String tt=new String();
    for(int j=0;j<4;j++)
    if(temp.get(j).toString() !="null")
    // System.out.println("In if loop");
    //System.out.println(temp.get(j).toString());
    String l=temp.get(j).toString();
    System.out.println(l);
    //System.out.println("Comma matches" + l.lastIndexOf(","));
    //System.out.println(min_weights);
    f++;
    for(Enumeration e=h.keys();e.hasMoreElements();)
    //System.out.println("I am here");
    int ii=0;
    int smallest=0;
    String key=(String)e.nextElement();
    System.out.println("key=" + key);
    temp=(ArrayList)h.get(key);
    System.out.println("Array List" + temp);
    for( int j=0;j<4;j++)
    String l=(temp.get(j).toString());
    if(l!="null")
    System.out.println("l=" +l);
    [\code]

    In your example you selected the pair with the greatest
    distance from the first set, and the pair with the least
    distance from the second. I don't see how the distance
    function was used.
    Also it's not clear to me that there is always a solution,
    and, if there is, whether consistently choosing the
    furthest or the closest pairs will always work.
    The most obvious approach is to systematically try
    all possibilities until the answer is reached, or there
    are no possibilities left. This means backtracking whenever
    a point is reached where you cannot continue. In this case
    backtrack one step and try another possibility at this
    step. After all possible choices of the previous step,
    backtrack one more step and so on.
    This seems rather involved, and it probably is.
    Interestingly, if you know Prolog, it is ridiculously
    easy because Prolog does all the backtracking for you.
    In Java, you can implement the algorithm in much the same
    way as Prolog implementations do it--keep a list of all the
    choice points and work through them until success or there
    are none left.
    If you do know Prolog, you could generate lots of random
    problems and see if there is always a solution.

  • Ipod problem NEED HELP ASAP

    Hello guys,my ipod touch has battery problems and internal speaker are not working and will apple replace me a new one,i even have 1 year warranty and i want a new ipod touch white instead of black<<<plz plz plz reply ASAP plz really need HELP!THANK YOU

    If you iPod is defective, in warranty and not abused Apple will replace it with a refurbished one.  They may or may not replace it with the white one.  You will have to ask.
    Other users have asked the same question but I hav never heard them come back with whether or not they go the color changed.

  • Another Infinite Login Loop Problem - need help badly

    Hello. I need help.
    When I start up my iMac (24 inch last generation model) I can't log into the OS. When I enter my password I see the default OS wallpaper (nothing else) then it kicks me to a blue screen then right back to the login. Same thing over and over. I've already ran disk utility off of the install CD to repair permissions, etc... but no luck. This even happens when I enter into safe mode. I'm running the latest version of the OS.
    Can anyone help me?

    Restore the bootable backup/clone or Time Machine backup. Without one, you have a difficult situation. First thing to try is boot with your install disc, run Disk Utility, and repair the disk.

  • Ipod nano Problems need help fast!!!!!!

    I got my nano in october everything was working fine.Until 2 weeks ago my ipod wasnt getting reconized by itunes.Im really getting frustrated and i need help.

    Welcome to Apple Discussions!
    Read through this...
    http://docs.info.apple.com/article.html?artnum=61711
    btabz

  • Urgent Problem, need help asap.

    Hello everyone,
    I'm sorry for the alarmist title, but I need help and I need it badly. Just last night, my macbook froze with nothing working. The mouse froze, the interrupt keys didn't work, nothing. I shut down the laptop, and tried to restart. I noticed a clicking sound coming from the lower left hand corner of the macbook. I'm assuming this is the hard drive.
    What happens is that there will be two clicks happening in a rythmic fashion, and after 15 second of booting up, a folder will appear with a question mark on the screen. The only thing I can do is power it down. Can someone please describe what is happening and make suggestions?
    The kicker is that I'm a college student studying in Denmark for the semester. The laptop is my only lifeline to back home. Please, any help is greatly appreciated.
    Matt

    You may have a disk failure or simply corrupted files. If you have a bootable backup that is working, then you can boot from it, erase your hard drive, then restore your backup. If not then do this:
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger and Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger, and 4.1 for Leopard) and/or TechTool Pro (4.6.1 for Leopard) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    If the drive is OK then you can reinstall OS X:
    How to Perform an Archive and Install
    An Archive and Install will NOT erase your hard drive, but you must have sufficient free space for a second OS X installation which could be from 3-9 GBs depending upon the version of OS X and selected installation options. The free space requirement is over and above normal free space requirements which should be at least 6-10 GBs. Read all the linked references carefully before proceeding.
    1. Be sure to use Disk Utility first to repair the disk before performing the Archive and Install.
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger) and/or TechTool Pro (4.5.2 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Do not proceed with an Archive and Install if DU reports errors it cannot fix. In that case use Disk Warrior and/or TechTool Pro to repair the hard drive. If neither can repair the drive, then you will have to erase the drive and reinstall from scratch.
    3. Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When you reach the screen to select a destination drive click once on the destination drive then click on the Option button. Select the Archive and Install option. You have an option to preserve users and network preferences. Only select this option if you are sure you have no corrupted files in your user accounts. Otherwise leave this option unchecked. Click on the OK button and continue with the OS X Installation.
    4. Upon completion of the Archive and Install you will have a Previous System Folder in the root directory. You should retain the PSF until you are sure you do not need to manually transfer any items from the PSF to your newly installed system.
    5. After moving any items you want to keep from the PSF you should delete it. You can back it up if you prefer, but you must delete it from the hard drive.
    6. You can now download a Combo Updater directly from Apple's download site to update your new system to the desired version as well as install any security or other updates. You can also do this using Software Update.

  • Graphic problem need help A.S.A.P.

    The class below called "IconGen" will not display the graphic it is suppose to when I call it into a main and add it to a JPanel. If someone could tell me why this code doesn't produce a graphics I would be greatly appreciative.
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class IconGen extends JComponent{
    private     Color salmon = new Color(255,128,128);
                   Polygon p = new Polygon();
    IconGen(){
                   int[] x = {75,125,75,25};
                   int[] y = {25,75,125,75};
                   int pts = 4;
                   Polygon p = new Polygon(x,y,pts);
    public void paintComponent(Graphics2D g2){
                   super.paint(g2);
                   g2.setPaint(salmon);
                   g2.fillPolygon(p);
    }

    I rearraged and modified your layout code a little bit.
    Here is the working code:
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    public class Simple {
       public static void main(String args[]){
          JFrame jf = new JFrame("IconGen"); //Begin JFrame setup.
          jf.addWindowListener(new WindowAdapter(){
          public void windowClosing(WindowEvent e){
          System.exit(0);}
          jf.setSize(200,200);
          jf.setBackground(Color.gray);
          jf.setVisible(true); //End JFrame setup.
          JPanel jp = new JPanel(); //Begin JPanel setup.
          IconGen i = new IconGen("Hostile"); //Instantiate IconGen.
          jp.setLayout(new GridLayout(1,1));
          jp.add(i); //Add IconGen to JPanel.
          jp.setSize(200,200);
          jp.setBackground(Color.white); //End JPanel setup.
          jf.getContentPane().add(jp); //Add JPanel to JFrame.
          jf.pack();
          jf.setSize(200,200);
          jf.show();
          jp.repaint();
    }  IconGen again. I added a constructor.
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class IconGen extends JComponent{
       private Color salmon = new Color(255,128,128);
       Polygon p = new Polygon();
       public IconGen(String str){
          this();
       IconGen(){
          int[] x = {75,125,75,25};
          int[] y = {25,75,125,75};
          int pts = 4;
          p = new Polygon(x,y,pts);
          repaint();
       public void paintComponent(Graphics g){
          Graphics2D g2 = (Graphics2D)g;
          g2.setPaint(salmon);
          g2.fill(p);
    }

  • CS6 Web Gallery template selection problem, need help...

    Using Bridge CS6  to create a web gallery and the only template available is "Standard" which is Flash based. I can open the pull down menu and see 11 templates including the HTML which I want to use but it defaults back to "standard" each time. Seems like there is some link or source that is missing... any help?
    LB

    Curt, the only way I see catalyst is when I'm in the advance setting for (I guess the viedo card) I see info for gaming, video, display, & more.  All that it will let me do is turn it off or on and I'm really not sure what I need to do to update that driver.  Normally, I just run a window check to be sure the drivers are up to date but I don't know where to look for the driver to even see about updating it.  If you are able to help, I would really appreciate it.  I think I spent about 2 hours yesterday trying to do everything I could think of to fix it.... and I really want to be able to start playing with creating 3d graphics. Also, I just looked up the driver you are talking about, based on the info you are seeing that I posted, do I need to download Catalyst Software Suite
    that includes:
                                 Display Driver ver. 13.152   
                                 OpenCL(tm) Driver ver. 10.0.1268.1
                                   Catalyst Control Center ver. 2013.0830.1943.3358
    Message was edited by: Nita H

  • Graphic Design major needs help choosing a Mac!

    I'm a Graphic Design student, and I'm about to purchase my first Macbook Pro. I need to know the minimum specs my Mac needs, without sacrificing performance. I'll be running multiple Applications/Programs simultaneously without stalling or crashing. (ie: Photoshop, Illustrator, Indesign, Internet with lots of tabs, music, and occassionally whatever program they'll use for my animation class.) I have a MyBook external terabyte, so saving large projects won't be an issue. Also, I kind of want to have an internal CD/DVD drive, but if that sacrifices performance way too much, I can get an external.
    I've been offered this used MBP that is one year old, for a reduced price, http://www.apple.com/macbook-pro/specs/  (See the specs for the 13" for $1199), but will it be enough? Even if I buy more RAM and install it myself, will the processor be fast enough? Will everything else be enough?
    Here's the link comparing all the new MBP's, http://www.apple.com/why-mac/compare/notebooks.html , some of which can be upgraded for an additonal price. Is it necessary to purchase one of these? Which one? Is Retina Display necessary? Performance is more important to me than money, but I don't want to just get an excessive amount of GHz, RAM, etc...that I won't even need. Can anyone help?

    Your link to the Best Buy MBP does not work for me but I looked on the best but website and found the only 17" MBP, model MC725LL/A, which is an early 2011 MBP.  It does not say which CPU it has, a 2.2 GHz or 2.3 GHz.  Either way the price is the most attractive.
    If this is left over and not an open box, it probably represents the best value in that respect.  I would establish if it is really new and what CPU it has before committing any funds.  I note it has Snow Leopard as the OS which has been supplanted by Lion and Mt. Lion.  You might think that this is a negative, but it really is not.  You may always install Mt. Lion at a later date ($20) if you feel you have to.  I have a late 2011 17" MBP which came with Lion and I have also installed Snow Leopard on it.  Snow Leopard is the most efficient OS that Apple has offered and I do not consider obsolete by any means.
    Though Apple says that 8 GB RAM is the maximum, all 2011 MBPs will accommodate 16 GB.  I have that in my MBP.
    There is one point that you should seriously consider. That Is the Glossy vs. the Anti-glare display.  It would be best that you go to an Apple store and look at them side by side in order to make an informed decision.  I have a MBP with the Glossy display, my first one, which I like but the second one I got has the Anti-glare and that in my opinion is the more practical.  The newest one is also Anti-glare.  I have heard it said by serious photographers that the colors are more accurate on the Ant-glare displays.  It may be worth the price differential, but you have to decide.  (That is another item that should be determined with the Best Buy option)
    If you have any additional questions, just ask!
    Ciao.

  • Intel iMac sleep problem, need help !

    My 17" Intel iMac has sleep problem past few days.
    I use the Ctrl+Eject on the keyboard to put my iMac to sleep and it only needs 3 to 5 sec before.
    But now I use same method, it got 30 sec. to sleep; same result thru Apple menu>sleep.
    Used Onyx & repair permissions, still no change.
    Anyone know what's the problem, how to fix it?
    Plz help!
    Thx!

    Danlam,
    A simple SMC (System Management Controller) reset is known to resolve a lot of sleep/wake related issues.
    Here's how to do the reset:
    - From the Apple menu, choose Shut Down (or if the computer is not responding, hold the power button until it turns off).
    - Unplug all cables from the computer, including the power cord and any display cables.
    - Wait at least 15 seconds.
    - Plug the power cord back in, making sure the power button is not being pressed at the time.
    -Then reconnect your keyboard and mouse to the computer.
    - Press the power button on the back to start up your computer.
    Follow this link to the Apple Article that describes the SMC and how to reset it in more detail: http://docs.info.apple.com/article.html?artnum=303446
    Hope this helps you out.

Maybe you are looking for