How to make the slider longer?

Hi,
I want to add a slider in my code, but the slider is too short to choose the number.
Could anyone tell me how to make it? Thank you!
The following is my code.
slider1.setMin(0);
slider1.setMax(100);
slider1.setValue(10);
slider1.setShowTickLabels(true);
slider1.setShowTickMarks(true);
slider1.setMajorTickUnit(10);
slider1.setMinorTickCount(10);
slider1.setBlockIncrement(1);
slider1.setLayoutX(50);
slider1.setLayoutY(20);

This seems fine to me. Can you explain more what the problem is you are seeing? If you want the slider to be longer, you can manually size it (set the prefWidth, as in the following example). If that is indeed the problem, then I would suggest you look into one of the layout panes shipped with the platform which will help with making sure it is resized as you would expect.
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Slider;
import javafx.stage.Stage;
* @author Richard
public class ShortSlider extends Application {
     * @param args the command line arguments
    public static void main(String[] args) {
        Application.launch(args);
    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World");
        Group root = new Group();
        Scene scene = new Scene(root, 300, 250);
        Slider slider1 = new Slider();
        slider1.setMin(0);
        slider1.setMax(100);
        slider1.setValue(10);
        slider1.setShowTickLabels(true);
        slider1.setShowTickMarks(true);
        slider1.setMajorTickUnit(10);
        slider1.setMinorTickCount(10);
        slider1.setBlockIncrement(1);
        slider1.setLayoutX(50);
        slider1.setLayoutY(20);
        slider1.setPrefWidth(400);
        root.getChildren().add(slider1);
        primaryStage.setScene(scene);
        primaryStage.show();
}

Similar Messages

  • How to make the page longer

    I'm having an issue fitting everything I need into the space provided by the program. Is there any way to make the page longer in order to fit everything I need into it? Thank you in advance.

    Taffypro wrote:
    What is the best width setting so that my website appears to take up the full screen
    Gary ~ Apple's own design award-winning site at apple.com mostly has a width of *980 pixels*. Apple's developer guidelines for the iPhone/iPod touch say: "Safari on iPhone also sets the viewport width to *980 pixels*, the width of most webpages." And: "...if your webpage is less than *980 pixels* wide causing it to scale too small on iPhone..."

  • How to make the dblink and what is the use of this

    plz any body tell me "how to make the dblink and what is the use of this"
    sujit

    Do you understand how to make the Slider work using code to read its value?  You will need to look into that in order to do this.
    What you can do is have the yello rectangle be a movieclip that sits over the red rectangle and use the Slider to control the yellow rectangle's alpha property from 0 to 1.  That way the yellow will gradually fade as you slide.
    What you will then need  to do is figure out how to make the number of dots that appear reduce from 15 to 8 over the same range of the slider.  You need to use the fractional value from the slider to decide how many dots either appear or do not appear.
    You should not start new postings for the same topics that you arlready have postings for.  Doing so in the future might result in them being removed.

  • HT203909 Why can't you provide specific instructions here about how to make the USB drive bootable?  The article referenced is not dedicated to Bootcamp--too long, too many options.  How do you make it bootable?

    Why can't you provide specific instructions here in HT203909 (Boot Camp: Creating an ISO image from a Windows installation DVD) about how to make the USB drive bootable?  The article referenced for partitioning the drive is not dedicated to Bootcamp--too long, too many options.  How do you make it bootable?

    If your BC Assistant shows the option to create a USB Installer, it automatically is marked as bootable. There is no need to have manual intervention to make a bootable USB. Once the process is manually modified, it is supported by the person modifying it.
    You have two or three options (depending on your Mac Model).
    1. Create USB... - Use a USB2 flash drive, which is erased and formatted. If your Mac supports ISOs then BCA will prompt for the Media. Any Mac which does not have a built-in Optical drive will support an ISO. There are specific Mac models which support both, DVD and USB based installation.
    2. Download Software from Apple servers...
    3. Install Windows...
    Are any additional instructions really necessary?

  • How to make the phone's battery last longer ?

    Hi everyone,
    i am wondering if there is any difference when the battery is fully desharged thus the phone swithes off , and then you plug it into the power outlet to be charged.
    or if it is not fully decharged, and it has some one or two battery bars on the upper right corner of the display, and you set it to be charged, is there any signifficant difference between these two states ?
    is there any official or technical advice on "How to make the phone's battery last longer " ??
    thanks in advance.

    It depends on the battery.
    Charging the battery when there is some power in it is especially bad for NiMH batteries. The loss of power is called "memory effect" - battery "remembers" that it does not get fully utilized and over time starts supplying less power.
    But new Nokias come with Li-Ion or Li-Polymer and the effect on these being charged when there is still power in them is negligible. Especially for the Li-Polymer ones.
    See here about batteries and "memory effect":
    http://en.wikipedia.org/wiki/Battery_%28electricity%29#Life_of_rechargeable_batteries
    http://en.wikipedia.org/wiki/Memory_effect
    Here's more info on types of batteries:
    http://en.wikipedia.org/wiki/Li-Ion
    http://en.wikipedia.org/wiki/Lithium_polymer_cell
    Ericsson T10i -> Nokia 7110 -> Siemens C45, C55, M55, M65 -> Nokia 6131, N73, N82 -> HTC Wildfire, Desire HD -> Nokia Lumia 800 -> HTC Desire X -> Lumia 820 -> Sony Xperia SP -> Lumia 925 + Sennheiser CX 500
    If I've helped, use the Kudos button to thank

  • Anyone have any ideas of how to make the battery on the iphone5 last longer?

    Anyone have any ideas of how to make the battery on the iphone5 last longer? I don't use the phone that much and the battery does not last all day. Phone is new.

    Many suggestions can be found here
    1. turn off push email and use fetch or manual fetch instead.
    2. turn off or at least limit notifications
    3. limit use of apps that use location services (eg. maps app - heavy power useage when running).
    4. in General->About->Diagnostics & Usage, turn off Automatic sending.
    5. Privacy->Location Services->System Services, disable everything (none of it need be running for normal use).
    6. Wifi, turn off "Ask to Join Networks" so your device is not polling all open networks it finds.
    7. keep brightness as low as you can get by with.
    Finally, get a car charger, and a second charger for work/school and just plug in whenever it is convenient to do so.
    Or, if it suits your daily routine better, get an external battery power brick or case and charge it periodically from that.

  • I merge projects in aperture, it works fine until aperture restarts.  After aperture restarts, the projects are no longer merged, and are back the way they were.  Can anyone suugest how to make the merge permanent?

    I merge projects in aperture, it works fine until aperture restarts.  After aperture restarts, the projects are no longer merged, and are back the way they were.  Can anyone suugest how to make the merge permanent?

    I tried the first aid tasks but the issue is still there.  I have more info now though.  It's not a problem with merging.
    The problem is that new projects are being generated everytime aperture starts (with the same name, ie 01, 02.... and 01 (1), 02 (1) .....)
    When aperture start, it shows "importing".  When I click on importing, it goes into the activity box.  In the activity box, has many lines as below.  The added projcts are all empty.  It's annoying because i have many useless projects being generated.

  • How to make a slide show or edition including mpeg and other formats

    Hi,
    I am i bit puzzled by the use of iphoto/imovie/itunes.
    I have a Sony camera which generates jpg photos and mpg videos; besides, i have 3gp and mp4 videos from cell phones.
    Firstly, i imported all of them to iphoto. I used a automator workflow to help importing from hotsynced Palm centro files, to discover the first problem with the 3gp files: they could not be iported by workflows.
    Still, they could be seen in iphoto, but then i tried to make a slide show. My idea was to put the photos and videos of a certain event to be watched together, or at least to be able to watch the videos in a sequence, without having to click on each one.
    I didnt get it in iphoto, so i switched to imovie. it was even worse, since it cannot import the mpgs and the 3gps (the jpg photos were ok). What could i do about that? is there any converter or other way?
    then i tried the itunes, and it was the opposite: it imported and played in sequence the mpg videos, but not the photos. This is a workaround anyway, since the program expects to play movies, and makes my daughter a "star", but that`s ok, she is one to me.
    i'll be thankful for hints on how to make the imovie compatible with the 3gp and mpgs, or finding some way to do this edition in iphoto or even with itunes.
    regards

    I see, it sounds reasonable , i think i will buy the pro and try.
    QT Pro ($30) and MPEG Streamclip (free) complement each other. In many cases one can do things that the other cannot. For instance, MPEG Stramclip can handle/edit multiplexed formats while QT Pro cannot. QT Pro allows layering of data tracks while Streamclip does not. Streamclip merges file streams more easily than QT Pro but QT Pro allows the "Movie to MPEG-4" export to "passthrough" the video while Streamsclip does not. And so on and so forth...
    I was referring to the mpegs from the Sony camera, of which a have hundreds, shot in the last 3 or 4 years, mainly from my 5-year old daughter. Is the above true to these?
    That still doesn't help. By "sony camera," are you referring to a still digital camera (multiplexed MPEG-1) or a Sony video camcorder taking MPEG-4/AVCHD with AC3 audio in an MPEG wrapper, a Sony DVD/HDD camera storing some kind of MPEG-2/AC3 files. On a Mac, the extension MPG normally refers multiplexed MPEG-1 (or MPEG-1 audio layer) files while MPEG normally refers to multiplexed MPEG-2 video content with MPEG-1, layer 2 audio (MPEG2/MP2) but may also refer to files with MP3 or AC3 files in an MPEG, VOB, or TS wrapper. In addition it may loosely refer to elementary M2V video streams (M2V video file paired with a separate AIFF or AC3 file), a standard MPEG4/AAC file (in an MOV or MP4 wrapper) or a standard H.264/AAC file in MOV, MP4, or M4V wrapper). Since the handling, conversion, editing requirements vary with each type of file, it becomes important to what specific kind of content/file container we are dealing with here.

  • Slide duration - How to make one slide have a different duration to another slide?

    Slide duration - How to make one slide have a different duration to another slide?
    EG So one slide has 2 seconds, another 4 another 6
    All I can see is how to make all slides have the same duration
    Any help very much appreciated!
    Brian

    Slide durations are not changeable on a slide-by-slide basis.

  • How to make the delivery cost changeable after cancellation of GR?

    Create a PO (with Delivery cost), then GR (101) , then cancel the GR (102), but the delivery cost still cannot be modified eventhough the GR has been cancelled - how to make the delivery cost changeable after cancellation of GR?

    Hi
    "You are not allowed to add new delivery costs in a purchase order once goods receipt has been carried out as these would then be proposed in the invoice verification. The related posting to the clearing account for goods receipt and invoice receipt would not then balance, if no further goods receipt took place.
    After the invoice has been received successfully, it is not possible to change the delivery costs in the order. This is because information necessary for problem-free operation is no longer available for the delivery costs that have already been posted for subsequent reversals or invoices, or the operation can no longer be done without errors.
    It is also not possible to change delivery costs for stock transfers with SD shipping after goods have been successfully issued, as this can lead to errors during cancellation."
    I think you have to delete the line item and create a new line item with revised delivery conditions..
    MRao

  • Captivate 7: How to make the output fit-to-screen

    Hi Everyone,
    For the long time, I was in search of making the published SWF be able to display the project as fitting to the screen. I was previously using Captivate 5.5. But now, I'm using Captivate 7. Does anyone know how to make the same thing happen to the SWF file? I previously had to make a change in the HTML script. But that same script line does not exist in the HTML file published from Captivate 7.
    Please be aware that I don't know much about HTML scripts. So please be explicit with your assistance.
    Thank you in advance for any assistance that you can provide.

    Hi there
    In Captivate 7, when you publish in SWF format, choose the option titled "Scalable HTML Content".
    Cheers... Rick

  • User exit to make the field 'Long text for UD' as mandatory

    Hi Gurus,
    My requiremen is that while doing UD, I need to make the field 'Long text for UD' as mandatory for the rejected materials
    pls suggest.
    Thanks
    Ganesh

    Hi,
    U can use the badi ME_PROCESS_PO_CUST methid  PO PROCESS_ITEM. In this u have both doc type and line item data and using this u can through the error message to make the field compulsory.u can go to the 'Goto' in menu and in this go to 'Sample code' .Here u will find how to use this badi.

  • How to make a slide bar that controls opacity

    I'm trying to figure out how to make a slide bar that would control opacity. If I were to take to pictures on top of each other, the slide bar would control the opasity of the top image. Thanks

    can you make a slider that controls anything?  if so, what's the range you can control?
    ie, when the slider is at one extreme it causes some object to have value1 and when it's at the other extreme the object has value2.  what value1, value2 can you handle?

  • How to make a slide wait until user has answered a question correctly, even after activating a smartshape?

    Background:
    I have created a quiz in which the user must answer each question correctly before proceeding to the next slide. This is what I did:
    Set preferences to Settings > Required > Answer All - The user must answer every question to continue
    Set the number of attempts on the question level to Infinite
    Made the Next button invisible and disabled the playbar
    This way, the user can only proceed to the next question slide with the Submit process – and, since attempts are infinite, that means only after successfully answering the question.
    Current goal: 
    I want the user to be able to click on a prompt for a hint. To set this up, I did the following:
    Created a smartshape labeled “click_for_hint” displaying text that says, “Click here for a hint”
    Created a smartshape labeled “hint” displaying text hint
    Set “click_for_hint” to show “hint” on success
    Now, when the user clicks on the text that says, “Click here for a hint,” the hint pops up. So, that works – awesome! However, once the hint is activated, I would like for the user to be able to continue infinite attempts until successfully answering the question… and only then, after answering correctly, proceed to the next slide.
    The problem:
    If the user has submitted one or more incorrect answers and then activates the hint, the slide no longer waits until the user has answered the question correctly. Instead, it automatically resumes playing, proceeding to the next slide. I tried setting the smartshape “hint” to pause on success, but that did not work.
    Is there a way to make the slide wait until the question is answered correctly before proceeding to the next slide, even after the hint has been activated?

    Are you aware of the fact that your Required setting can cause problems, blocking the user? It is also totally unnecessary, because you have infinite attempts on question level, and did hide the Next button (hope you don't need Review, otherwise I would recommend not to hide that button but to drag it under the Clear button: Question Question Slides in Captivate - Captivate blog)
    The hint problem is linked with the fact that a simple action will release the playhead. I would like to see the timeline of the slide, to compare the pausing points of the shape button and the question slide. And maybe this blog post can also clarify difference between simple/advanced: Why choose Standard over Simple action? - Captivate blog
    As for shape buttons on question slides: Buttons on Question/Score Slides in Captivate 6? - Captivate blog

  • Hi. I have a 2008 macbook pro 15.4 inch. Not abused but the hinge is stiff and the lid/ screen is starting to de-laminate at the bottom edge. Any ideas on how to make the hinge work a little more freely and how to re-seal the screen to the lid?

    Hi. I have a 2008 macbook pro 15.4 inch. Not abused but the hinge is stiff and the lid/ screen is starting to de-laminate at the bottom edge. Any ideas on how to make the hinge work a little more freely and how to re-seal the screen to the lid?

    When you have kernel panics, the pertinent information is in the panic report.
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ System Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar.
    There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of reports. A panic report has a name that begins with "Kernel" and ends in ".panic". Select the most recent one. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    If you don't see any reports listed, but you know there was a panic, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.

Maybe you are looking for

  • Script Editor does not work. Panel blue and empty.

    Hi I installed Oracle Database XE yesterday on Acer TravelMate C300, Microsoft XP SP2 Tablet Edition and .. I cannot read SQL scripts I cannot access to the editing panel of Scripts Editor when I want to create a new script. I used System and HR logi

  • What is this symbol with a circular arrow at the top of my contacts list?

    ive noticed on my iphone 4s it now has a circular arrow in the top left of my conacts list like a refresh symbol but it does nothing. does anyone know what its for? i swear it wasnt there yesterday. also how do you get rid of duplicate contacts or co

  • ACR 9.0 Menu

    I can't open any of the toolbar menus in ACR.  Bridge and PS are up to date (Using CC). Anyone?

  • Cannot delete record in master detail form in apex 4.0.1

    Dear all, I've created a master detail form in apex 4.0.1. Inserting and updating records is working. But when i want to delete a detail or master record, nothing is happening. The delete button is just not working. Can someone please tell me if this

  • How to build a DC after removing dependencies.

    Hello, We have migrated WDJ dc from from 7.0 to 7.3. Earlier in 7.0 GP(Guided Procedure) was used for business workflows. but in 7.3 we have to use BPM. so i have removed all GP related dependencies from the WDJ dc but i am not able to build the dc.