Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: Returning to Java - have questions Date: Sun, 25 Jan 2015 11:01:34 -0500 Organization: A noiseless patient Spider Lines: 49 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 25 Jan 2015 16:04:12 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="c50a9e5d554cfaba13eda1c71e805135"; logging-data="11366"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/c0yLoH7rFo6oLpeyon5c0H2vYQ0sg3yE=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 In-Reply-To: Cancel-Lock: sha1:dEQzQZG/oG91NzOVzbO+3vXLR8g= Xref: csiph.com comp.lang.java.programmer:30876 On 01/22/2015 11:12 AM, Jerry Stuckle wrote: > On 1/22/2015 9:49 AM, Jeff Higgins wrote: >> On 01/22/2015 09:07 AM, Jerry Stuckle wrote: >>> On 1/22/2015 6:48 AM, Jeff Higgins wrote: >>>> On 01/21/2015 11:06 PM, Jerry Stuckle wrote: >>>>> Hi, all >>>>> >>>>> Well, I'm just getting back into java after about a 15 year hiatus. I >>>>> did a bunch of it back then, both SE and EE, but then got off on other >>>>> projects. >>>>> >>>>> Now I want to get my fingers back into it and see massive changes. >>>>> It's >>>>> going to take a log of getting used to. >>>>> >>>>> For instance, I was looking at a game I wrote back then (nothing >>>>> fancy - >>>>> just something to play with). With Swing it's very easy to change the >>>>> look of buttons by loading a new image, i.d. when the player presses >>>>> the >>>>> button. It seems with fx the only way you can change the button when >>>>> it's pressed/not pressed is via css. While I guess there are >>>>> advantages >>>>> to doing it this way, I haven't seen them yet. And I'd rather be able >>>>> to control the button looks myself. >>>> >>>> extend SkinBase >>>> and use Control.setSkin(Skin value) >>>> >>> >>> Actually, I don't need to extend anything to set a static image - I can >>> just use setImage() and not have any text. >> >> I was responding to your statement above, "It seems with fx the only >> way you can change the button when it's pressed/not pressed is via css." >> How is using setImage() using CSS? I'm confused. >> >>> >>> But that doesn't tell me if the button is pressed or not, so I don't >>> know when to change the image to the pressed one. >>> >> > > Sorry, it's setGraphic(). And while that sets the image, there is no > way for me to determine whether I should be using the "normal" image or > the "pressed" image. That seems to be only available via CSS. > Please provide a runnable demonstration.