Working with canvas. Rectangle won't fill.

Hey, i'm working with canvas.
[code]
GraphicsContext g2d;
g2d.strokeRect(x, y, w, h); //Rect gets drawn.
g2d.setStroke(Color.WHITE); //Strokes are white, works as well.
g2d.setFill(Color.BLUE); //Nothing happens. i expect the rectangle to be filled blue. Am i doing something wrong?
[/code]
Thanks y'all.
edit: lmao, trying to format my text.

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class CanvasFillRectTest extends Application {
    @Override
    public void start(Stage primaryStage) {
        Canvas canvas = new Canvas(400, 400);
        GraphicsContext gc = canvas.getGraphicsContext2D();
        gc.setFill(Color.BLUE);
        gc.setStroke(Color.WHITE);
        gc.fillRect(50, 50, 300, 200);
        gc.strokeRect(50, 50, 300, 200);
        Pane pane = new Pane();
        pane.getChildren().add(canvas);
        Scene scene = new Scene(pane, 400, 400, Color.CORNFLOWERBLUE);
        primaryStage.setScene(scene);
        primaryStage.show();
    public static void main(String[] args) {
        launch(args);
edit: lmao, trying to format my text.
Choose "Use Advanced Editor" at the top... then select your code, press the "Insert" button marked >>, and choose syntax highlighting, Java.

Similar Messages

  • I use XPSP2. I use FF 3.6.22 because of Roboform. I'm reluctant to update FF because I don't know what will work with XP XP2 (won't be using XP3). Which FF ve

    Roboform lied to me when I purchased it, promising that I would receive all updates AND upgrades "for life." Then they apparently colluded with FF to turn that into a lie, because they didn't grandfather-in the customers to whom they made this promise for free upgrades. I will never buy any version of Roboform again.
    I still use FIREFOX 3.6.22 because that is the last version that my version of Roboform works with. I use XP SP2. Because I don't want Microsoft's spyware and controlware on my PC, I won't be using SP3 or any version beyond XP. I will be moving completely to Linux when what I have no longer serves my needs.
    I can't upgrade Firefox to any version more recent than 3.6.22 because FF has not made it clear which is the highest version that works properly with XP SP2. I can't run any version that requires XP SP3 to run properly.
    Ann Fennell
    [email protected]

    Hi there! Actually, Roboform works with modern versions of Firefox. Please update to Roboform 7.9.0, and update Firefox to version 22 immediately. Continuing to use Firefox 3.6 is leaving your computer at risk for MAJOR security holes, plus known stability and performance issues. Please update immediately.
    Also, Firefox will work perfectly fine with XP SP2, but there is no reason why you shouldn't update XP to SP3

  • DVD/CD Drive Problem: Works with DVDs, but won't Read CDs

    As the title states, my laptop's CD drive will not read CDs (it is a satellite A205 by the way).  The yellow light lights up, it makes noises as if it is trying to read the CD, but just doesn't do it.  It won't show up as a CD being there when I look it up on "computer".  On the other hand, when I put a DVD in, it works no problem.  Anyone have any idea of what I could do?  I've tried uninstalling the driver on device manager and restarting the computer, thus allowing it to reinstall it, and it didn't help.  Any and all help is greatly appreciated!

    Try cleaning out the drive with compressed air and/or a lens cleaning disk.  This often times helps. 
    Next try booting to a Linux Live CD or some other Self Booting CD like Memtest.  If it doesn't then you know for sure that the drive itself is defective as you are taking Windows out of the equation.  If it does, then you know it's a Windows problem which will more than likely require restoring the system to it's factory out of box state using the Recovery DIsks to fix.
    If the drive works with a Live CD then try going into device manager, uninstall the DVD drive, then reboot the system to have Windows automatically re-install it.  This sometimes helps as well.
    If you don't post your COMPLETE model number it's very difficult to assist you. Please try to post in complete sentences with punctuation, capitals, and correct spelling. Toshiba does NOT provide any direct support in these forums. All support is User to User in their spare time.

  • Help! Ai CC - Can't see transform arrows and arrow for rotating when i work with simple rectangle!

    I can't do simple transform with with shapes. Like in this video: Adobe Illustrator CC 2014: "Live Shapes" N.S.L: WEEK 155 - YouTube

    Be,
    I am afraid you are actually facing the Live Rectangle bug which is limited to the MAC versions starting with 10.7 and 10.8, but not 10.9 (Mavericks) or 10.10 (Yosemite). Hopefully, the bug will be fixed soon.
    So a switch to Mavericks or Yosemite with a reinstallation might be the way to solve it here and now.
    To get round it in each case, it is possible to Expand the Live Rectangles to get normal old fashioned rectangles, or to Pathfinder>Unite, or to use the Scale Tool or the Free Transform Tool.
    A more permanent way round that is to create normal old fashioned rectangles, after running the free script created by Pawel, see this thread with download link:
    https://forums.adobe.com/thread/1587587
    If neither this nor the Bounding Box (nor the Edges for some things), then it may be time for the list.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save curent artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • IPhone 5 not working with data or won't send text messages

    Is it possible to get my phone replaced by verizon, my phone is not usable right now and I need it in case of emergency. On my LCD screen you can also see thin blue lines throughout; it looks like it is getting worse, is there anything I can do about this??

        Wow! Have not heard of an issue like that before! Let's get this figured out! Is the touchscreen responding to your touch? When did the lines appear? Does the phone have any signs of physical or liquid damage? Use think link to determine if it does, there is also a way to view the Liquid Damage Indicator in the phone http://vz.to/1xbpcqs
    SandyS_VZW
    Follow us on Twitter @VZWSupport

  • Apple TV2 airplay audio (via Airport Express) works well with music, but won't work with any video.

    I have an ATV2 and Airport Express connected to speakers all connected to the same network. It all works with music, but won't work with any video audio. In my ATV's settings I've selected my AirPort Express speakers. It works for music, why not everything else? Is there a fix or work around?

    Netflix is first on that list...What I mean is, if there is a feature that allows for a wireless audio connection to the Apple TV, why wouldn't the developer allow it. To keep me from enjoying a more convient connection? I can have the same listening experience on a wired connection...

  • Comcast email doesn't work with firefox 26. I can't get a full inbox, get to my preferences to change, drop downs need to use arrows to get to

    firefox 26 doesn't work with comcast email. won't keep me signed in; won't show whole inbox in either full or lite; won't allow me to get to preferences; drop downs only work with arrows. I could just keep going.
    Earlier this week they worked fine.

    Be sure to delete the login.comcast.net cookie, it is not near the other comcast and xfinity cookies.

  • Elements 10 canvas not working with tiff images; works fine with jpegs. What to do?

    Elements 10 canvas not working with tiff images; works fine with jpegs. What to do? It does not allow me to add a colored canvas, only a blank canvas.

    Perhaps some of the tiffs are already layers.
    In other words, since jpegs don't support layers, they all ways open with one locked background layer, but the tiff format does
    support layers so the tiffs don't have to have a locked background layer and can already be a regular layer that supports transparency.
    For the tiffs you could add a new color fill layer below and use the color you want the enlarged canvas to be.
    On pse 10 look at the bottom of the layers panel for the new adjustment of fill layer icon

  • I bought Aperature and PS from a university store, not under my apple username, now it won't let me update it to work with Yosemite because it isn't hooked to my username.  how do i fix it and get the upgrade

    A few years ago or so i bought Aperture and Photoshop (the whole kit and caboodle) from a university subsidized store (my husband worked there and buying programs like those two, the whole Microsoft office Suite, all kinds of things) at a very significant discount, i think we paid 25$ for Photoshop vs the 400$ it was selling for on the open market. 
    Yesterday i upgraded most of my laptops to Yosemite (one of them I'm sure was the one that had Aperture on it, a 17in MacBookPro, its about 2 years old now, but at the time i bought it it was the highest computer apple had on the regular floor, I'm sure i could have added some stuff to customize it for extra, but basically we are talking top of the line computer.  I recently just required a 2012 MackBook Air with also fairly heavy specs from a family member that was upgrading (I'm not sure why, i know they couldn't possibly be using this thing for anything beyond its capacity, its basically new,  and they aren't 3D animation rendering and needed a "quicker" one).
    I was very happy with the upgrade, and now it does work much more seamlessly with my iPads and my iPhone, but the whole reason i uploaded it was to work on pictures, adjust them, change the size and then print them out to include in jewelry, and Yosemite won't let me use Aperture at all, when i click to upgrade it (in the bar all it has basically old icon with a (no sign or ghost busters like sign over it) i click on it and it says, you did not buy this with your apple account name and i could not upgrade it.  But it just made me click ok, and did not give me any info on how to upgrade it.  i do physically own it, or my husband does, I'm not sure to whom it is registered, but sholdnt i still make it able to work with this new operating system, even if not through regular "software updates"  it used to always be asking me to upgrade "word" and i got that in the same way, so what is the issue and what do i do to get it to work on this new system?

    Wow that was really quick, thank you so much.  Im not sure at all which version it was because i said it was around 4 years ago he bought it.  I know it isn't under his username, since he's a PC person (ugh) so i know its probably registered to one of our actual names.  isn't there some way to look it up since we did register it, because I'm not even sure where the disks are from when we bought it (we've moved a lot and also have two storage lockers, i know i would have kept it with other disks) but my cd rom drive is actually broken on my computer as well ( i think it got stepped on and is now squished and won't eject or run disks.)
    So is there anyway they can look up that its registered to one of our names since we did register it when we bought and installed it, or do i really have to find the disk with some sort of proof of purchase (i know there would be no receipt after all this time)
    either way, ill do what you suggested to the best of my abilities and thank you so much for answering my questions, i can't even open the program as its incompatible and find out the info from that) so I'm in a bit of a pickle and your response was so thorough and it didn't seem to be posted long enough to even write a well researched response, thanks, all the best,
    sarucia

  • My Viewsonic monitor won't work with the Imac using the Mini Port to DVI adapter.

    My Viewsonic monitor won't work with the Imac using the Mini Port to DVI adapter. I also tried the HDMI to DVI adapter ane the Mac-Mini with same result. The monitor does work on my older Macbook Pro that has the DVI connector. Is it a Software/Driver issue ?

    Should be extremely simple, please carefully read Connect multiple displays to your Mac. If you still have problems then it's probably a cable issue that would be resolved by replacing the adapter cable. You should be using this adapter. If you are using a third party adapter that might be your problem!

  • I have a PowerBook G4 with a non-functioning monitor.  It used to work with an external monitor, but I reinstalled the OS, which cleared the display preferences and now when I restart it won't detect the external monitor. How do I fix?

    I have a PowerBook G4 with a non-functioning monitor.  It used to work with an external monitor, but I reinstalled the OS, which cleared the display preferences and now when I restart it won't detect the external monitor. This means I can't use the computer anymore. How do I fix? I tried using the Command+F2 keyboard shortcut, but it doesnt' work.  It's possible that since I reinstalled the OS, it still needs to be set up, so there's only a welcome screen (but since I can't see it I'm not sure).

    There is no limit to the number of times you can re-install Office on the same computer.
    You can activate by telephone:
    The last paragraph is the relevant bit

  • My iPod Classic is seen by Windows but not by iTunes.  I have reset it, gone to disk mode and it won't show up in iTunes.  There appears to be music on it in a file called MUSICSAVE.  How can I get this to work with iTunes again?

    My iPod Classic is seen by Windows but not by iTunes.  I have reset it, gone to disk mode and it won't show up in iTunes.  There appears to be music on it in a file called MUSICSAVE.  How can I get this to work with iTunes again?

    1. Update iTunes to the latest version. Plug in your iPod. If iTunes still can't recognize it, then in iTunes in the top left corner click help> run diagnostics. On the box that comes up, check the last two things. Click next and it should identify your iPod.
    2. Click on your windows start menu. Type in "services". Click on it and when it pops up, on the bottom of it click on "standard". Now Scroll down to find "Apple Mobile Device" Right click it when you see it and click on "Start". When it has started, close iTunes and replug in your iPod and it should show up.
    3. Check the USB cable
    4 Verify that Apple Mobile Device Support is installed
    5. Restart the Apple Mobile Device Service and verify that the Apple Mobile Device USB Driver is installed.
    6. If you just want to add some photos, songs and movies from computer to your devices, you can use an iTunes alternative to do the job
    7. Check for third-party software conflicts.
    <Link Edited By Host>

  • Html5 video player won't work with slider script??

    Hi - I'm new to html5 and Dreamweaver, but I've worked with html in the past, so most things aspects aren't foreign to me.
    My question is this: I'm working with an existing html5 template and it had a slider graphics bar near the top. It works fine and scrolls through three pre-made banners.
    The problem is I just added the widget for HTML5 Videoplayer and inserted it into my code. The video box, etc. shows up fine, and will play, but now the slider graphic box at the top doesn't work anymore. Instead it just displays all three banners as images, one on top of the other.
    When I look closer at the script code that the widget embeds, it seems as though the script widget code is not playing well with the existing script code. When I remove the script code that the widget installs, the slider works perfectly again (but the video obviously won't play).
    The exact code is included below. My question is, how can I make the two of these scripts work together???Any help would be great appreciated. Thanks, Blair
    <script src="scripts/elegant-press.js" type="text/javascript"></script>
    <script src="kaltura-html5player-widget/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="kaltura-html5player-widget/mwEmbed-player-static.js" type="text/javascript"></script>
    <!--[if IE]><style>#header h1 a:hover{font-size:75px;}</style><![endif]-->
    <link href="kaltura-html5player-widget/mwEmbed-player-static.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    /* BeginOAWidget_Instance_2294029: #kalturaPlayer */
                                  @import url("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/redmond/jquery-ui.css");
    /* EndOAWidget_Instance_2294029 */
    </style>
    <script type="text/xml">
    <!--
    <oa:widgets>
      <oa:widget wid="2294029" binding="#kalturaPlayer" />
    </oa:widgets>
    -->
    </script>

    Hi - I'm new to html5 and Dreamweaver, but I've worked with html in the past, so most things aspects aren't foreign to me.
    My question is this: I'm working with an existing html5 template and it had a slider graphics bar near the top. It works fine and scrolls through three pre-made banners.
    The problem is I just added the widget for HTML5 Videoplayer and inserted it into my code. The video box, etc. shows up fine, and will play, but now the slider graphic box at the top doesn't work anymore. Instead it just displays all three banners as images, one on top of the other.
    When I look closer at the script code that the widget embeds, it seems as though the script widget code is not playing well with the existing script code. When I remove the script code that the widget installs, the slider works perfectly again (but the video obviously won't play).
    The exact code is included below. My question is, how can I make the two of these scripts work together???Any help would be great appreciated. Thanks, Blair
    <script src="scripts/elegant-press.js" type="text/javascript"></script>
    <script src="kaltura-html5player-widget/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="kaltura-html5player-widget/mwEmbed-player-static.js" type="text/javascript"></script>
    <!--[if IE]><style>#header h1 a:hover{font-size:75px;}</style><![endif]-->
    <link href="kaltura-html5player-widget/mwEmbed-player-static.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    /* BeginOAWidget_Instance_2294029: #kalturaPlayer */
                                  @import url("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/redmond/jquery-ui.css");
    /* EndOAWidget_Instance_2294029 */
    </style>
    <script type="text/xml">
    <!--
    <oa:widgets>
      <oa:widget wid="2294029" binding="#kalturaPlayer" />
    </oa:widgets>
    -->
    </script>

  • Bridge from CS3 won't open and just sits on the task bar. If I hover over it, I can see a small view of the last screen I was working on. It won't open up full screen, what should I do. I've closed it and restarted my computer numerous times with no luck.

    If I hover over it, I can see a small view of the last screen I was working on. It won't open up full screen, what should I do. I've closed it and restarted my computer numerous times with no luck.

    Check System Preferences > Energy Saver
    Select:  Put hard disks to sleep when possible
    Then click: Restore Defaults

  • My external monitor worked with my MacBook Pro before I took it on a little trip, now it won't work.  Any suggestions?

    My external monitor worked with my MacBook Pro before I took it on a little trip, now it won't work.  Any suggestions?

    Never mind.  Sorry.  It fixed itself.

Maybe you are looking for

  • Any way to modify an app to another sort of readable (not from ipod/ipad) document?

    i downloaded an app - it's a shopping guide i wrote - is there any way to change the file type so that i can view it as a pdf or any other sort of readable (not from ipod/ipad) document?

  • Oracle 9i sql query??????????????

    hello grp,thanks for you help................. i have again some doubts to solve can anyone plz solve these.......... 1) Create a query that will display the total number of employees and, of that total, the number of employees hired in 1995, 1996, 1

  • Motion doesn't answer anymore FCP6

    Motion doesn't answer anymore under FCP 6. From FCP, i do send to Motion project. The appli opens and then nothing. It seems i have thrown something i shoudn't. Excuse the poor quality of my english.

  • Bootable tape/dvd/cd/network backup

    I usually work with AIX based systems that has a feature called mksysb. It lets me make a on the fly system backup while system is in full production, to a tape, CD, disk, DVD of file. The backup contains: the OS, boot information, kernel adjustments

  • BIEE Physical and Business joins

    Hi I have about 10 table in database that I join. almost all table are interconnected. I have made many joins but that is not woking properly. some time it gives error and some time it gives double result. So can anyone tell me what are the precautio