CREATING A JSLIDER AND PUTTING NAMES OF THE MONTHS ON IT!

hey!
i wanna creat a Jslider and put the names of the months on it (starting from Jan to Dec) .i tried but all in vain.
i want some body to please help me.(it is the third slider in my code)
thanks!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.text.SimpleDateFormat;
public class Grid extends JFrame /*implements ActionListener*/
static final int FPS_INIT = 15; //initial frames per second
static final int FPS_INIT2=2000;
//THIS LINE
static final double FPS_INIT3=Aug;
int intframeNumber = 0;
int delay;
boolean frozen = false;
private JPanel date_panel,year_panel, month_panel,day_panel;
private String time=new String("");
private Date date=new Date();
public Grid() {
time=time + new Date().toString();
SimpleDateFormat formatter = new SimpleDateFormat("E, MMMM d, yyyy") ;
     time = formatter.format(date) ;
          date_panel=new JPanel();
          year_panel=new JPanel();
          month_panel=new JPanel();
          day_panel=new JPanel();
          JSlider framesPerSecond = new JSlider(JSlider.HORIZONTAL,
          1, 31, FPS_INIT);
     JSlider framesPerSecond2 = new JSlider(JSlider.HORIZONTAL,
          1990, 2010, FPS_INIT2);
//THIS LINE
     JSlider framesPerSecond3 = new JSlider(JSlider.HORIZONTAL,
     Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec, FPS_INIT3);
     date_panel.setLayout(new FlowLayout());
          date_panel.add(new JLabel(time));
day_panel.setLayout(new FlowLayout());
day_panel.add(framesPerSecond);
year_panel.setLayout(new FlowLayout());
year_panel.add(framesPerSecond2);
month_panel.setLayout(new FlowLayout());
month_panel.add(framesPerSecond3);
          // JSlider framesPerSecond = new JSlider(JSlider.HORIZONTAL,
          // 0, 31, FPS_INIT);
//          framesPerSecond.addChangeListener(new SliderListener());
          //Turn on labels at major tick marks.
          framesPerSecond.setMajorTickSpacing(5);
          framesPerSecond.setMinorTickSpacing(1);
          framesPerSecond.setPaintTicks(true);
          framesPerSecond.setPaintLabels(true);
          framesPerSecond.setBorder(
          BorderFactory.createEmptyBorder(0,0,10,0));
          framesPerSecond2.setMajorTickSpacing(5);
                              framesPerSecond2.setMinorTickSpacing(1);
                              framesPerSecond2.setPaintTicks(true);
                              framesPerSecond2.setPaintLabels(true);
                              framesPerSecond2.setBorder(
                              BorderFactory.createEmptyBorder(0,0,10,0));
framesPerSecond3.setMajorTickSpacing(2);
                              framesPerSecond3.setMinorTickSpacing(1);
                              framesPerSecond3.setPaintTicks(true);
                              framesPerSecond3.setPaintLabels(true);
                              framesPerSecond3.setBorder(
                              BorderFactory.createEmptyBorder(0,0,10,0));
//JPanel contentPane = new JPanel();
          //Create the label for the animation.
          // picture = new JLabel(new ImageIcon("images/doggy/T"
          // + frameNumber
          // + ".gif"),
// JLabel.CENTER);
          Container contentPane = getContentPane();
          contentPane.setLayout(new GridLayout(4,4));
contentPane.add(date_panel);
contentPane.add(year_panel);
contentPane.add(day_panel);
contentPane.add(month_panel);
public static void main(String args[]) {
          Grid gw = new Grid();
     gw.setTitle("Date Slider");
          gw.setSize(400,200);
          gw.setVisible(true);

Hi there
It's been a while since you posted this issue but here is one sulotion that could help you or any body else
xySlider = new JSlider(JSlider.HORIZONTAL, -40, 90, 0);
        ySlider = new JSlider(JSlider.HORIZONTAL, -40, 90, 0);
        xTSlider = new JSlider(JSlider.HORIZONTAL, 0, 99, 0);
        yTSlider = new JSlider(JSlider.HORIZONTAL, 0, 99, 0);
        Hashtable labels = new Hashtable();
        labels.put(new Integer(-40), new JLabel("1/5"));
        labels.put(new Integer(-30), new JLabel("1/4"));
        labels.put(new Integer(-20), new JLabel("1/3"));
        labels.put(new Integer(-10), new JLabel("1/2"));
        labels.put(new Integer(0), new JLabel("1"));
        labels.put(new Integer(10), new JLabel("2"));
        labels.put(new Integer(20), new JLabel("3"));
        labels.put(new Integer(30), new JLabel("4"));
        labels.put(new Integer(40), new JLabel("5"));
        labels.put(new Integer(50), new JLabel("6"));
        labels.put(new Integer(60), new JLabel("7"));
        labels.put(new Integer(70), new JLabel("8"));
        labels.put(new Integer(80), new JLabel("9"));
        labels.put(new Integer(90), new JLabel("10"));
        xySlider.setLabelTable(labels);
        ySlider.setLabelTable(labels);
        xySlider.setPaintLabels(true);
        ySlider.setPaintLabels(true);better late then never
//Markus

Similar Messages

  • I created a Group and put in all names and email addresses but cannot get the group to appear in an outgoing email message.  What am I doing wrong?

    I created a Group and put in all names and email addresses but cannot get the group to appear in an outgoing email message.  What am I doing wrong?

    This may help.
    Can't connect to the iTunes Store
    What happens whenyou try to connect? Error messages?

  • When I import a commercial CD itunes will create 2 identical albums and put all of the songs except one into one album and put the other song into the other album by it self. How can I combine them all into one album and why is itunes doing this?

    When I import a commerical CD Itunes will create 2 identical albums and put all of the songs except one into one album and put the other song into the second album that it created.  Why is itunes doing this and what can I do to combine them into one album?

    I found this to be somewhat helpful: Grouping Tracks into Albums
    What I did was to put in the same name for Album Artist in every track.  That seemed to do the trick (previously all those fields were empty).  It seems like a lot of work for a simple thing.
    iTunes knows (or should know) that these tracks were imported from one CD. So why is it relying on incomplete data from the gracenote database?

  • How to put name in the application toolbar

    how to put name on the button in the application tool bar while it is created with selection screen

    I've never seen this done this way.  Learn something new everyday.  Anyway, here is a sample program that will show you what you need to do to add text to your function button,  this also adds an icon.
    report zrich_0002.
    Tables: sscrfields.
    selection-screen function key 1.
    select-options: s_datum for sy-datum.
    INITIALIZATION.
      MOVE '@49@ Export'  TO SSCRFIELDS-FUNCTXT_01. "ICON_EXPORT
    If this has solved your problem, please award points accordingly and mark this post as solved.  Thanks.
    Regards,
    Rich Heilman

  • Can I transfer money to other accounts on my iPad with iOS 5.1.1? I created another account and put an iTunes gift card on it, but then I realized that all of my apps are on another account, so how do I move that money over?

    Can I transfer money to other accounts on my iPad with iOS 5.1.1? I created another account and put an iTunes gift card on it, but then I realized that all of my apps ere on another account, so when I recovered the password of my previous account, I had money on an account that I do not want to use. Can I transfer the money over?

    Not on your own. Click here and ask the iTunes Store staff to put it back onto the card; they'll only do this if none of the balance has been spent.
    (115868)

  • How to show company name and contact name on the incoming calls of iPhone 4

    Kindly provide me with a useful solution of how to show company name and contact name on the incoming calls of iPhone4.
    even with an application or from the setting of the iPhone itself, but without telling me a solution like writting the company name in the contact name field.
    This is a very important option, i think it is a must, not an option and apple should fix this problem fastly. because it is already available in the older models of iPhone like iPhone 3G and 3GS.
    How an important feature like this could be available in old models, but in the later models is not available?

    Currently not possible without putting the company name in the contact name's field.  AFAIK, it's never been available on any iOS version.
    You might check the App Store for an app that can do this although I'm pretty sure you won't find one.
    http://www.apple.com/feedback/iphone.html

  • My ipad won't let me sign in to my FaceTime and iMessage and won't update my apps no more ever since I got my iphone and put them on the same account. Does anyone know how to fix it or why it's doing this

    II've had my ipad with retina display for about a 1 now and everything was fine In till I got my iphone 4s and put them on the same account then my ipad stopped letting me log in to my FaceTime and iMessage and it doesn't let me update my apps and dosnt let me log in to iCloud ever since I got my phone and put them on the same account does anyone know how I could fix it and still be able to connected to my iphone??

    Did you change your Apple ID?
    Unable to make or receive FaceTime calls after April 16, 2014
    http://support.apple.com/kb/TS5419
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Set Up Alert Sounds
    http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
    Extra FaceTime IDs
    http://tinyurl.com/k683gr4
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Fix Can’t Sign Into FaceTime or iMessage iOS 7
    http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    iOS 7 allows you to block phone numbers or e-mail addresses from contacting you via the Phone, FaceTime, or Messages
    http://howto.cnet.com/8301-11310_39-57602643-285/you-can-block-people-from-conta cting-you-on-ios-7/
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457#19087457
    How to watch FaceTime calls on the big screen with Apple TV
    http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Text on the iPad
    http://ipad.about.com/od/ipad_tricks/a/How-To-Text-On-The-Ipad.htm
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    How to Receive SMS Messages on an iPad
    http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
    Apps for Texting http://appadvice.com/appguides/show/apps-for-texting
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • After I download my music to library and put it on the cloud can I delete my library so it doesn't take up space on my hard drive?

    After I download my music into library and put it on the cloud, can I delete my library so it doesn't take up space on my hard drive.

    I thought maybe it would be a little easier to understand where I am getting all these numbers from if I gave you guys some screenshots.
    Here is the information for the original files (pulled straight from the card onto the external):
    Here is the information for the FCP Library:
    Here is the information for the folder within the FCP Library called "Original Media":
    And finally, here is the information for the folder within the FCP Library Called "High Quality Media":

  • HT1766 how do i save my old photos and put it on the new device?

    how do i save my old photos and put it on the new device?

    Here is how to get everything:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    To get photos taken by or saved to the iPod to the computer see:
    iOS: Importing personal photos and videos from iOS devices to your computer
    If they were synced from a computer you need a third-party program like TouchCopy or PhoneView to get them into the computer.
    To move from computer to new iPod
    iOS and iPod: Syncing photos using iTunes

  • I purchased Photoshop for mac a few years ago and put it on one of my computers. Since then, I have gotten a new mac desktop without a disc drive. I would like to take my photoshop off of the old computer and put it on the new one. Is there anyone I can d

    I purchased Photoshop for mac a few years ago and put it on one of my computers. Since then, I have gotten a new mac desktop without a disc drive. I would like to take my photoshop off of the old computer and put it on the new one. Is there anyone I can download it?

    What version?

  • Path and File name of the attachment

    Hello Srm Guys,
    Where should be the Path and File name of the attachment are stored for a shopping card Item.
    Thanks
    Ram

    Hello Ram,
    Execute the function module BBP_PROCDOC_ITEM_GETDETAIL by providing the item guid,object type . Now it will populate the  et_attach importing parameter with the attatchement details.
    In the ET_ATTATCH internal table , the field PHIO_FNAME/PHIO_PATH_FILE provides the physical storage location of the document.
    Hope this info will be helpful.
    Regards,
    Mani

  • How to make blank copies of a PDF file and put it into the printer tray.

    Dear experts,
    Before you try printing the data from the FM, How tomake several blank copies of the PDF file  and  put it in the printer tray so that you can print just the data from the function module on it??????
    Please reply.

    Hi drredwood,
    When you open your PDF file a yellow bar will appear on the top of the screen.
    Click on 'Enable All Features'.
    Then you will be able to copy the content from your pdf and to paste in any of the file.
    Regards,
    Florence

  • Hi.is it possible to add 2 columns and put it in the third calumn thru sqll

    Hi.is it possible to add 2 columns and put it in the third calumn thru sqll
    Hi i have 3 columns
    callstart,duration and callrelease
    In the extract i get values only for callstart and duration.
    Is possible thru sqlldr to output the sum of callstart and duration into callrelease.

    May This Can Help You..
    SQL> select * from table_a;
            ID SCHEDULED  MARK             PRID
             5 07-NOV-10  T05                 7
             6 18-SEP-10  T06                 8
             4 31-JAN-11  T02                 2
             1 18-JAN-11  T01                 2
             2 18-JAN-11  T02                10
             3 18-JAN-11  T03                 1
    6 rows selected.
    SQL> alter table table_a add mix varchar(50);
    Table altered.
    SQL> select * from table_a;
            ID SCHEDULED  MARK       PRID MIX
             5 07-NOV-10  T05           7
             6 18-SEP-10  T06           8
             4 31-JAN-11  T02           2
             1 18-JAN-11  T01           2
             2 18-JAN-11  T02          10
             3 18-JAN-11  T03           1
    6 rows selected.
    SQL> update table_a
      2  set mix=mark||to_char(id);
    6 rows updated.
    SQL> commit;
    Commit complete.
    SQL> select * from table_a;
            ID SCHEDULED  MARK       PRID MIX
             5 07-NOV-10  T05           7 T055
             6 18-SEP-10  T06           8 T066
             4 31-JAN-11  T02           2 T024
             1 18-JAN-11  T01           2 T011
             2 18-JAN-11  T02          10 T022
             3 18-JAN-11  T03           1 T033
    6 rows selected.
    SQL> Regards
    Umesh

  • Table names and field names for the PO item details

    Hi,
    I want table names and field name for the below fields.
    I have PO number i want to get below fields for PO.
    <b>Confirmed Ship Date (or actual ship date if already shipped) – PGI Date
    Quantity of Product to be shipped (base unit of measure) Sales Order Qty
    Shipped Quantity of Product (normally zero)
    Shipped From Plant Name</b>
    Excellent reward is compulsary.
    reagrds,
    vijay

    Hi,
    Please find below the some of tables and fields for the PO. But from your query hope you are refering some other PO.
    Table : EKPO
    Fields
    KTMNG - Target Qty
    MENGE - Open Qty
    WEPOS - Goods Receipt
    LEWED - Latest GR date
    Table : EORD
    Fields
    RESWK - Procurement plant
    FRESW - Fixed Issuing plant
    LIFNR - Vendor
    FLIFN - Fixed vendor
    Regards,
    BK

  • I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    1-800-676-2775  apple support   tech support 1 800 275 2273
    If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
    click the apple----->click about this Mac ------> click on version----> until you see the serial number.  You may have to do this a couple of times if it freezes before you have all the numbers.  A camera might help.
    Good Luck

Maybe you are looking for

  • Equivalent to SpreadSheet? (I need to merge cells)

    Hey all, I'm making a program dealing with scheduling. Now i need something that works as a Spreadsheet. a lot of you may say 2 use JTable, but there's a problem with that idea, i can't merge cells. For example The Columns are days of the week, Rows

  • I cant add contacts with the new ios.5

    i cant add or remove contacts from my ipod with the new ios.5 so i cant use the imessage app

  • [SOLVED] i'm trying to mount an iso

    hi, im trying to mount a cd image, but am getting the following error, [root@arch image]# mount -t iso9660 -o loop image.iso cd1 mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error In som

  • Finally Setup - What is the next step?

    ** please ignore ** Message was edited by: quacker1964 - posted in wrong section.

  • JDeveloper 1012 Corrupt ADF Project

    I have just come across a strange problem in using Jdeveloper 1012 to create an ADF project. The project is very simple at present, containing a class to represent a person (surname and age fields with appropriate getter and setter methods), a class