Font color preview not working?

I created a gradient and tried to save it for web, but the preview only showed me a dark orange color. That was the foreground color, but I don't know why that became the entire picture.
Also, I saved it anyways, and when I opened the image using picasa photo viewer, the gradient showed up just as I wanted it to. However, when I placed it on a webpage, there was only a dark orange color.
I read a similar post about this:
http://forums.adobe.com/thread/707027
How do I 'resync' those settings? I'm completely new to photoshop so I have no clue how to do that.
I also tried changing the foreground color to black, as he suggested. The preview still showed an orange color.
I'd really appreciate some help on this. Thanks!

Which format, which settings (screenshot please)?

Similar Messages

  • The visited sites font color does not work

    if I revisit the site. the color does appear while the left-click is held then is gone

    * Make sure that you not run Firefox in (permanent) [[Private Browsing]] mode
    * In Private Browsing mode some menu items are disabled (grayed) and features like visited links are disabled and not showing
    * You are in Private Browsing mode if you see "Tools > Stop Private Browsing", possibly grayed
    * You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    * To see all History settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Uncheck: [ ] "Automatically start Firefox in a private browsing session"

  • Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. Did you saw this problem?

    Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. What is intresting - in full screen mode everything works fine. Did you saw this problem?

    It seems there's a workaround here:
    https://discussions.apple.com/thread/5566037?tstart=0

  • I have iphone 4s and just bought an ebook for ibook, trouble is the font is so tiny I can't read it and the font sizer is not working? Please help!

    Hi, I have the  iphone 4s and just bought an ebook for ibook, trouble is the font is so tiny I can't read it and the font sizer is not working? Please help!

    Hello Glittergirl68,
    Thank you for using Apple Support Communities.
    It sounds like the function to reseize the Font in an iBook is not functioning properly.
    I recommend a few things here. First close all the apps that are running in the background:
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    From: iOS: Force an app to close
              http://support.apple.com/kb/ht5137
    When you have done that, restart the phone, and try again.
    If the issue persists, I would follow these steps from the article:
    iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/TS1702
    2. Check for app updates
    You can setup apps to update automatically in Settings > iTunes & App Store, but make sure that your apps are up to date:
    Open the App Store and tap Updates. If updates are available, tap Update All.
    If  prompted, enter your iTunes Store account information. App Store will then download and install the app updates.
    Note: Some apps may require a Wi-Fi connection to update.
    3. Install another app from the App Store
    If none of your user-installed apps will launch, there could be an issue with Apple ID authorization. Download and install an app that isn't already installed on your device to reset this information. You can also remove an app from your iOS device and download it again from the App Store or sync the app from your computer.Note: If you have installed apps using multiple Apple ID accounts, you may need to perform this step for each account.
    4. Restart the app
    If the issue affects only a single app, try closing just that app.
    5. Restart your device
    Turn the device off and on.
    6. Reinstall the affected app
    Remove the app from your device and reinstall it:
    Tap and hold any app icon on the Home Screen until the icons start to wiggle and show a small "x" in the top-right corner of the app.
    Tap the "x" in the corner of the app you want to delete.
    Tap Delete to remove the app and all of its data from your device.
    Press the Home button.
    Go to the App Store.
    Search for the app and then download it again.
    All the very best,
    Sterling

  • Preview not working in 10.6

    Preview not working in 10.6. Not able to open multiple JPG files. No problem in 10.5.7.
    Any solution?

    I've been following this thread and several others about this same issue with interest. Today I went to Astronomy Picture of the Day to take a look at the pix for August and downloaded eight of them. Whether it matters or not, I made a folder on my Desktop, then dragged the full picture from its "picture only" page into the folder. After I finished I opened the folder, did Command-A and double clicked the group. All eight opened in Preview and I used the down arrow to move from one to the next.
    I did an upgrade install of Snow Leopard on a VERY clean install of Leopard (pretty much no third party anything had been added, certainly no haxies, Contextual Menu items, Input Managers, menu bar extras, and only a limited number of third party applications).
    So unfortunately it looks like I can't investigate this issue since I can't reproduce it. Haven't seen anything in the discussions of the issue so far that lead me any theory about why some people have it and some, including me, don't.
    Francine
    Francine
    Schwieder

  • Pick color feature not working properly -- how do I reset?

    Pick color feature not working properly -- how do I reset?

    You need to contact Adobe for you billing problem this is a user four not adobe customer support.
    For your Photoshop Problems this user community may be helpful. 
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • Preview not working!!! Blank document appears!

    My Preview stopped working! I downloaded a few PDF documents, thinking that Preview would automatically launch and open the files. Preview did launch, however, all I saw were blank white documents, nothing on them.
    Next thing I did was open my Adobe Reader application and tried to read the PDF documents. Yes, it worked. I was able to see the documents.
    But why is Preview not working correctly? What is happening?

    Hi, Makiko. The version of Preview that came with Panther is old, and some of the features that newer PDF-creation software can build into PDF files may not be supported by it. In other words, your Preview application became static several years ago, while the PDF file format has continued to evolve. Your Preview can probably still open all the other file formats that it opened when it was new, but you may want to set things up so that all PDF files are handled by Adobe Reader instead. To do that, click once on any PDF file in the Finder and choose Get Info from the File menu. In the "Open with" section of the Get Info window, choose Adobe Reader from the drop-down menu, then click the Change All button. Close the Get Info window. Now all PDFs that you double-click will open in Adobe Reader.
    Note that at present, the latest version of Adobe Reader that works in Panther is 7.1.0. If you have an earlier version, you may want to update it.

  • "Select Color Range" not working. "Warning: No pixels were selected" returned when attempting to use. Using Photoshop CS6 on a Mac running OS X Yosemite

    "Select Color Range" not working. "Warning: No pixels were selected" returned when attempting to use. Using Photoshop CS6 on a Mac running OS X Yosemite

    Here are three screenshots in succession from trying to perform the color selection:
    Dropbox - Screenshot 2015-02-12 14.57.40.png
    Dropbox - Screenshot 2015-02-12 15.00.14(2).png
    Dropbox - Screenshot 2015-02-12 15.01.00.png

  • Preview Not Working - pls helpp..

    Hi there,
    I'm running Lion on my Macbook Pro and have a problem with Preview not working.
    It seems to have almost jammed and has a document that I don't think I even have anymore in it's title bar.
    The timeout / loading wheels continues to spin and I have to Force Quit.
    I have tried deleting the com.apple.Preview.plist - but this hasn't done anything.
    Any ideas & help greatly appreciated.

    To add to this. When I open it (preview) the file that it looks like it's opening is titled 'ai.icns'. I've got no idea what this was but have seen that it's a large graphics folder. I very possibly clicked on it whilst doing some work the other day and went to shut it down quickly and now it looks like it's in a state of opening-up but without actually getting anywhere..

  • Final Cut 6 and Color does not work

    Hello,
    I bought FInal Cut Pro Studio 2 and i receive the suite today and instal only apps ( no contents and loops )without problem
    Tried to open FCP6 and Color but not working.
    i launch FCP 6 or Color,2 jumps on dock and then quit.
    can be memory problem.( i have 768RAM on my imac G5 64VRAM)
    any pacth to resolv this problem?
    ps* SountrackPro 2,DVDStudio Pro,Motion3,LiveType,CinemaTools and Compressor woks fine in the same computer
    Computer configuration
    IMac G5 1.6 with 64VRAM and 768RAM
    thx in advance

    Ok,forgot Color,but and about final cut 6 ? why does not work?
    max resolution 1440x900.
    i was looking the systen requirements on fcp page
    Minimum Requirements to Install All Final Cut Studio Applications
    Final Cut Pro 6
    Macintosh 1.25GHz or faster PowerPC G4, PowerPC G5 = OK
    1GB of RAM = NO,my iMac have 768RAM
    1024-by-768 resolution or higher OK
    Mac OS X v10.4.9 or later OK
    QuickTime 7.1.6 or later OK
    A DVD drive for installation OK
    Can i deduce that problem is because i don't have RAM enought?
    THX

  • Secondary color correction not working in Premiere CC

    Greetings,
    I'm unable to build secondary color correction masks in Three Way Color Corrector, RGB Curves etc in the current version of Premiere CC.
    In any of these plugins, when I check "show mask" I get the usual white slate filling the frame. But when I use the color picker to make a selection the whole frame stays white. It appears that I'm making selections but it's not building the mask for some reason. When making an extreme color change I can see that the mask is not building as it affects the whole frame.
    This started after upgrading to CC. I've recently updated to the most up to date version (yesterday) and am still having the same problem.
    Premiere CC 2014.1 Release
    8.1.0 (81) Build
    Macbook Pro Retina, 15" Late 2013
    2Gh Intel Core i7
    8Gb
    Intel Iris Pro 1536Mb
    Yosemite Version 10.10
    *note-my Colleague is not having this problem, he's working on the same OS and same CC build but he has an Imac. So I'm guessing this problem is unique to my hardware config.
    Anybody else have this problem or know of a fix?

    I have the same Problem new MAC OS Premier Pro CC or Premier Pro CS6 both have an issue with the Title Tool. If you open the title tool and try to make color changes or change size of the font it sticks at the default color and default font. SOmetimes the title tool will work and then when I exit it's back to the default first type location, default font and default color. Sometimes it will not even let me exit the Title Tool.
    Please help I have Projects I'm working on Deadlines and I pay a monthly Fee for Software that works and it's not working.
    Model Name:          Mac Pro
      Model Identifier:          MacPro5,1
      Processor Name:          6-Core Intel Xeon
      Processor Speed:          2.4 GHz
      Number of Processors:          2
      Total Number of Cores:          12
      L2 Cache (per Core):          256 KB
      L3 Cache (per Processor):          12 MB
      Memory:          16 GB
    Software  OS X 10.9 (13A603)
    Graphics  ATI Radeon HD 5770 1024 MB

  • Acrobat Pro 11 - Output Preview not working

    This issue came up again on my Macpro. Although it's ok on my MBP. When try to analyze a PDF in "Output Preview" a few things aren't working for me. The "Total Area Coverage" warning will not display on screen. Also when I hover the cursur over the PDF I am no longer see percentages under the ink color Preview > Separations. Does anyone know of a quick fix so I don't have to keep going back to an oldere version of Acrobat?
    Thanks for your help.

    I think I'd uninstall Acrobat (there should be an Uninstaller in your Acrobat folder inside the Applications folder). Then reinstall the application.

  • Internet Explorer preview not working correctly.

    Hi,
    Well my problems seem to be mounting up, my website is loading completely fine in Chrome and Firefox, but in Internet Explorer it doesn't want to load properly. It seems that only the text is loading, leaving me to believe that the css files, style.css and style-desktop.css files are Not working in Internet Explorer.
    I have already tried running a browser compatibility test, but it comes up with no errors.
    Thanks.

    Hi Nancy,
    Here you go -
    style.css:
    /* Basic */
              *,*:before,*:after{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;-o-box -sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}
              body {
                        font-size: 13.5pt;
                        font-family: sans-serif;
                        font-family: 'Ubuntu Condensed', sans-serif;
                        color: #878e83;
                        letter-spacing: -1px;
                        text-align:center;
                        background: #D4D9DD url('images/bg01.jpg');
              h1,h2,h3,h4 {
                        color: #007897;
                        font-weight: normal;
              h1,h2 {
                        text-transform: lowercase;
              h2 {
                        font-size: 1.6em;
                        letter-spacing: -1px;
                        margin-bottom: 1em;
              h3,h4 {
                        color: #283121;
                        margin-bottom: 0.5em;
              h3 {
                        font-size: 1.2em;
                        margin-bottom: 0.8em;
              h4 {
                        font-size: 1em;
              p, ul {
                        margin-bottom: 1.25em;
              p {
                        line-height: 1.8em;
              strong {
                        color: #474e43;
              img.left {
                        float: left;
                        margin: 2px 1.25em 0 0;
              img.top {
                        margin: 4px 0 2.25em 0;
              ul {
                        padding: 0.25em 0 0 0;
              a {
                        color: #5d93a2;
                        text-decoration: underline;
              a:hover {
                        text-decoration: none;
              * > p:last-child {
                        margin-bottom: 0 !important;
    /* Copyright */
    #copyright {
              overflow: hidden;
    #copyright p {
              padding: 50px 0px 0px 0px;
              text-align: center;
              font-size: 11pt;
              color: #555;
    #copyright a {
              color: #888;
    style-desktop.css:
    /* Desktop (>= 480px)                                                            */
    /* Basic */
              body {
                        width: 1920px;
              section, article {
                        margin: 0 0 60px 0;
              section:last-child, article:last-child {
                        margin-bottom: 0;
              #content
                        border-bottom: solid 1px #272e31;
                        padding: 45px 0 45px 0;
                        text-shadow: -1px -1px 1px rgba(0,0,0,0.75);
                          text-align:left;
    /* Reusable */
              .blog-post-image {
                        width: 588px;
    /* Header */
              #header-wrapper {
                        background-color: #007294;
                        background-image: -moz-linear-gradient(top, #008dab, #007294);
                        background-image: -webkit-linear-gradient(top, #008dab, #007294);
                        background-image: -webkit-gradient(linear, 0px 0px, 0px 1200px, from(#008dab), to(#007294));
                        background-image: -ms-linear-gradient(top, #008dab, #007294);
                        background-image: -o-linear-gradient(top, #008dab, #007294);
                        background-image: linear-gradient(top, #008dab, #007294);
              #header {
                        position: relative;
                        margin: 30px 0 30px 0;
                        padding: 0 20px 0 20px;
                        border-radius: 5px;
                        border: solid 1px #006e8b;
                        box-shadow: inset 0px 0px 0px 1px #12a0bf, 0px 1px 4px 0px rgba(0,0,0,0.10);
                        background-color: #007b9d;
                        background-image: -moz-linear-gradient(top, #008ead, #007b9d);
                        background-image: -webkit-linear-gradient(top, #008ead, #007b9d);
                        background-image: -webkit-gradient(linear, 0px 0px, 0px 1200px, from(#008ead), to(#007b9d));
                        background-image: -ms-linear-gradient(top, #008ead, #007b9d);
                        background-image: -o-linear-gradient(top, #008ead, #007b9d);
                        background-image: linear-gradient(top, #008ead, #007b9d);
                        height: 46px;
                        #header h1 {
                                  position: absolute;
                                  left: 20px;
                                  top: 0;
                                  color: #fff;
                                  font-size: 2.3em;
                                  letter-spacing: -2px;
                                  line-height: 40px;
                        #header h1 a {
                                  color: #fff;
                                  text-decoration: none;
                        #header nav {
                                  position: absolute;
                                  right: 20px;
                                  top: 1px;
                                  line-height: 43px;
                                  text-transform: lowercase;
                                  font-size: 1.3em;
                                  letter-spacing: -1px;
                                  #header nav a {
                                            display: inline-block;
                                            text-decoration: none;
                                            color: #fff;
                                            padding: 0 25px 0 25px;
                                            outline: 0;
                                  #header nav a.current-page-item {
                                            background-color: #007897;
                                            background-image: -moz-linear-gradient(top, #007b99, #007897);
                                            background-image: -webkit-linear-gradient(top, #007b99, #007897);
                                            background-image: -webkit-gradient(linear, 0px 0px, 0px 1200px, from(#007b99), to(#007897));
                                            background-image: -ms-linear-gradient(top, #007b99, #007897);
                                            background-image: -o-linear-gradient(top, #007b99, #007897);
                                            background-image: linear-gradient(top, #007b99, #007897);
                                            box-shadow: inset 0px 1px 5px 1px rgba(0,0,0,0.1), 0px 0px 5px 1px rgba(255,255,255,0.1);
                                  #header nav a:hover {
                                            background-color: #0882a1;
                                            background-image: -moz-linear-gradient(top, #0782a0, #077d9b);
                                            background-image: -webkit-linear-gradient(top, #0782a0, #077d9b);
                                            background-image: -webkit-gradient(linear, 0px 0px, 0px 1200px, from(#0782a0), to(#077d9b));
                                            background-image: -ms-linear-gradient(top, #0782a0, #077d9b);
                                            background-image: -o-linear-gradient(top, #0782a0, #077d9b);
                                            background-image: linear-gradient(top, #0782a0, #077d9b);
                                            box-shadow: inset 0px 1px 5px 1px rgba(0,0,0,0.05), 0px 0px 5px 1px rgba(255,255,255,0.05);
    /* Footer */
    #footer
                        color: #546b76;
                        text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
                        align: top;
                        width: 1920px;
                        #footer h2
                                  font-size: 1.25em;
                                  color: #212f35;
                                  margin: 0 0 1em 0;
                                  align: top;
                        #footer a
                                  color: #546b76;
                                  align: top;
              #footer-wrapper
                        padding: 22px 0 80px 0;
                        text-shadow: 1px 1px 1px rgba(255,255,255,1);
                        background: #D4D9DD url('images/bg03.jpg');
                        width:100%;
                        border-bottom: solid 2px #272e31;
                        position:absolute;
                        bottom:0;
                        height:170px;   /* Height of the footer */
                        width: 1920px;
    /* Copyright */
        #copyright
            background: #151515;
            border-bottom: solid 1px #272e31;
            padding: 45px 0 45px 0;
            text-shadow: -1px -1px 1px rgba(0,0,0,0.75);
            position:absolute;
            bottom:0;
            width: 1920px;
            height:10px;   /* Height of the footer */
        #copyright {
            padding: 18px 0 18px 0;
                        text-align: center;
            align: top;
            color: #A6A88F;
            margin: 1% 0 0 0;
                        height:8px;   /* Height of the footer */
                        width: 1920px;
        #copyright a {
            color: #A6A88F;
    Thanks .

  • SetBackground(Color.WHITE) not working

    I am trying to set background color to white, but it's not working. Can anyone find out the problem?
    import java.io.*;
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.font.FontRenderContext;
    import java.awt.font.LineMetrics;
    import java.awt.font.TextLayout;
    import java.awt.geom.*;
    public class Lab3ex2 {
         * @param args ignored
         public static void main(String[] args) throws IOException {
              // Station[] stations = new Station[100];
              // int n = 0;
              ArrayList<Station> stations = new ArrayList<Station>();
              ArrayList xPos = new ArrayList();
              ArrayList yPos = new ArrayList();
              final String fname = "C://Positions-v2.csv";
              BufferedReader br = new BufferedReader(new FileReader(fname));
              String stationName, item, line;
              line = br.readLine(); // first line skipped
              line = br.readLine(); // 2nd
              while (line != null) {
                   StringTokenizer stoke = new StringTokenizer(line, ",");
                   stationName = stoke.nextToken().trim();
                   item = stoke.nextToken();
                   float x = Float.parseFloat(item);
                   item = stoke.nextToken();
                   float y = Float.parseFloat(item);
                   item = stoke.nextToken();
                   String justification = item;
                   // stations[n] = new Station(stationName, x, y);
                   // n++;
                   stations.add(new Station(stationName, x, y, justification));
                   xPos.add(x);
                   yPos.add(y);
                   line = br.readLine(); // line 3,4,...
              for (Station station : stations) {
                   System.out.println(station);
                   //System.out.printf("%20s %6.1f,%6.1f)%n",station.name, station.x, station.y);
              System.out.print("Press enter...");
              System.in.read();
              JFrame f = new JFrame("Lab3ex2");
              f.add(new MyPanel(stations, xPos, yPos));
              f.setSize(500,400);
              f.setVisible(true);
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // to avoid needing ^C
    class Station {
         public String name;
         public float x;
         public float y;
         public String justification;
         public Station(String name, float x, float y, String justification) {
              this.name = name;
              this.x = x;
              this.y = y;
              this.justification = justification;
         public String toString() {
              // todo: format x and y
              return name + " (" + x + "," + y + ")";
    class MyPanel extends JPanel {
         private ArrayList<Station> stations;
         private float xMax, yMax;
         private ArrayList xPos;
         private ArrayList yPos;
         public void paintComponent(Graphics g) {
              Graphics2D g2 = (Graphics2D)g;
              Dimension dim = getSize();
              float xScale, yScale, scale, x, y, radius = 1.0f, diam;
              String justification = null;
              diam = 2.0f*radius;
              Shape s;
              xScale = dim.width/xMax;
              yScale = dim.height/yMax;
              scale = Math.min(xScale, yScale);
              g2.scale(scale, scale);
              g2.setStroke(new BasicStroke(1.0f/scale)); // thin lines
              g2.setFont(new Font("SanSerif", Font.PLAIN, (int)(11.2f/scale))); // always 12 approx
              int total = 0;
              for (Station st : stations) {
                   if(st.name.length()>total)
                        total = st.name.length();
              for (Station st : stations) {
                   x = st.x - radius;
                   y = st.y - radius;
                   justification = st.justification;
                   s = new Ellipse2D.Float(x, y, 2.0f*radius, 2.0f*radius);
                   g2.draw(s);
                   g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                             RenderingHints.VALUE_ANTIALIAS_ON);
                   if(justification.equals("R"))
                        g2.drawString(st.name, (x-st.name.length())-2, (y+diam));
                   else
                        g2.drawString(st.name, (x+diam+radius), (y+diam));
    GeneralPath theShape = new GeneralPath();
         theShape.moveTo((float)(Float)xPos.get(0), (float)(Float)yPos.get(0));
    for(int i=0; i<15; i++)
         theShape.lineTo((float)(Float)xPos.get(i), (float)(Float)yPos.get(i));
    g2.draw(theShape);
    this.setBackground(Color.WHITE);
         public MyPanel(ArrayList<Station> stations, ArrayList xPos, ArrayList yPos) {
              this.stations = stations;
              this.xPos = xPos;
              this.yPos = yPos;
              xMax = -99999.0f;
              yMax = -99999.0f;
              for (Station st : stations) {
                   if (st.x > xMax) xMax = st.x;
                   if (st.y > yMax) yMax = st.y;
    }

    import java.io.*;
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.font.FontRenderContext;
    import java.awt.font.LineMetrics;
    import java.awt.font.TextLayout;
    import java.awt.geom.*;
    * Advanced Java Lab 3 ex 2: reading and drawing Met station data
    * @author rallen
    public class Lab3ex2 {
          * @param args
          *            ignored
         public static void main(String[] args) throws IOException {
              // Station[] stations = new Station[100];
              // int n = 0;
              ArrayList<Station> stations = new ArrayList<Station>();
              ArrayList xPos = new ArrayList();
              ArrayList yPos = new ArrayList();
              final String fname = "C://Positions-v2.csv";
              BufferedReader br = new BufferedReader(new FileReader(fname));
              String stationName, item, line;
              line = br.readLine(); // first line skipped
              line = br.readLine(); // 2nd
              while (line != null) {
                   StringTokenizer stoke = new StringTokenizer(line, ",");
                   stationName = stoke.nextToken().trim();
                   item = stoke.nextToken();
                   float x = Float.parseFloat(item);
                   item = stoke.nextToken();
                   float y = Float.parseFloat(item);
                   item = stoke.nextToken();
                   String justification = item;
                   // stations[n] = new Station(stationName, x, y);
                   // n++;
                   stations.add(new Station(stationName, x, y, justification));
                   xPos.add(x);
                   yPos.add(y);
                   line = br.readLine(); // line 3,4,...
              for (Station station : stations) {
                   System.out.println(station);
                   // System.out.printf("%20s %6.1f,%6.1f)%n",station.name, station.x,
                   // station.y);
              System.out.print("Press enter...");
              System.in.read();
              JFrame f = new JFrame("Lab3ex2");
              f.add(new MyPanel(stations, xPos, yPos));
              f.setSize(500, 400);
              f.setVisible(true);
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // to avoid needing ^C
    class Station {
         public String name;
         public float x;
         public float y;
         public String justification;
         public Station(String name, float x, float y, String justification) {
              this.name = name;
              this.x = x;
              this.y = y;
              this.justification = justification;
         public String toString() {
              // todo: format x and y
              return name + " (" + x + "," + y + ")";
    class MyPanel extends JPanel {
         private ArrayList<Station> stations;
         private float xMax, yMax;
         private ArrayList xPos;
         private ArrayList yPos;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              this.setLayout(new FlowLayout());
              Graphics2D g2 = (Graphics2D) g;
              Dimension dim = getSize();
              float xScale, yScale, scale, x, y, radius = 1.0f, diam;
              String justification = null;
              diam = 2.0f * radius;
              Shape s;
              xScale = dim.width / xMax;
              yScale = dim.height / yMax;
              scale = Math.min(xScale, yScale);
              g2.scale(scale, scale);
              g2.setStroke(new BasicStroke(1.0f / scale)); // thin lines
              g2.setFont(new Font("SanSerif", Font.PLAIN, (int) (11.2f / scale))); // always
                                                                                                        // 12
                                                                                                        // approx
              int total = 0;
              for (Station st : stations) {
                   if (st.name.length() > total)
                        total = st.name.length();
              for (Station st : stations) {
                   x = st.x - radius;
                   y = st.y - radius;
                   justification = st.justification;
                   s = new Ellipse2D.Float(x, y, 2.0f * radius, 2.0f * radius);
                   g2.draw(s);
                   g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                             RenderingHints.VALUE_ANTIALIAS_ON);
                   if (justification.equals("R")) {
                        g2.drawString(st.name, (x - st.name.length()) - 2, (y + diam));
                   } else {
                        g2.drawString(st.name, (x + diam + radius), (y + diam));
              GeneralPath theShape = new GeneralPath();
              theShape.moveTo((float) (Float) xPos.get(0), (float) (Float) yPos
                        .get(0));
              for (int i = 0; i < 15; i++) {
                   theShape.lineTo((float) (Float) xPos.get(i), (float) (Float) yPos
                             .get(i));
              g2.draw(theShape);
              setOpaque(true);
         public MyPanel(ArrayList<Station> stations, ArrayList xPos, ArrayList yPos) {
              this.stations = stations;
              this.xPos = xPos;
              this.yPos = yPos;
              xMax = -99999.0f;
              yMax = -99999.0f;
              for (Station st : stations) {
                   if (st.x > xMax)
                        xMax = st.x;
                   if (st.y > yMax)
                        yMax = st.y;
              this.setBackground(Color.WHITE);
              this.setVisible(true);
    }Edited by: swapnil_raverkar on Sep 21, 2008 5:10 AM

  • Color picker not working in Premiere CC running 10.9 Mavericks

    Im not able to use the color picker for text and even the color picker for ultra keys. When i want to select a color i want to use the cursor change to a text cursor. Please help asap. Thanks !!

    I have the same Problem new MAC OS Premier Pro CC or Premier Pro CS6 both have an issue with the Title Tool. If you open the title tool and try to make color changes or change size of the font it sticks at the default color and default font. SOmetimes the title tool will work and then when I exit it's back to the default first type location, default font and default color. Sometimes it will not even let me exit the Title Tool.
    Please help I have Projects I'm working on Deadlines and I pay a monthly Fee for Software that works and it's not working.
    Model Name:          Mac Pro
      Model Identifier:          MacPro5,1
      Processor Name:          6-Core Intel Xeon
      Processor Speed:          2.4 GHz
      Number of Processors:          2
      Total Number of Cores:          12
      L2 Cache (per Core):          256 KB
      L3 Cache (per Processor):          12 MB
      Memory:          16 GB
    Software  OS X 10.9 (13A603)
    Graphics  ATI Radeon HD 5770 1024 MB

Maybe you are looking for

  • How do I properly setup pin and gate swap groups on new components​?

    Hi, I've looked for some documentation explaining exactly how the pin and gate swap functionality works but I have not been successful. I am trying to get pin and gate swapping working correctly on some digital logic components that I have created (s

  • Help in search help

    Hi i create Z report. In the selection screen i have 2 field: werks and MKMNR ( Master Inspection Characteristics). when i press F4 on MKMNR i see search help  of MKMNR - <b>QPMK</b> I want that the value of the werks will automatic enter to search h

  • Mac mini won't boot after latest update Maverick

    My Mac mini running Maverick after an automatic update won't boot. " no bootable device -- insert boot disk and press any key" What option do I have here?

  • Erro while creating MIGO - Update terminate

    Hello All, While creating MIGO with ref to PO i am getting the following error Update was terminated System ID....   SAN Client.......   120 User.....   PURCHASE1 Transaction..   MIGO Update key...   5756D3E59A5B420DAA800130EFC8ECAC generated....   2

  • Would love some advice on a new purchase . . .

    I want to buy a new laptop. I currently have a 2001 PowerPC G4. 500MHz with 640 RAM. I'd love some advice on a new purchase. Sorry if this gets long-winded. These are my desires: (1) A serious upgrade in speed, into the Giga world. I work for a law f