Date/Calendar picker-- please help

Hello
Would someone please help me out? I am trying to get the date picker from the demo below.
http://www.toedter.com/en/jcalendar/demo.html
However, I have a JButton in my short program. Once I click on the JButton, I need the calendar to show just as it does w/ the first icon in the demo.
According to the documentation calling JDateChooser() would make the calendar visible. I have installed the package on my machine.
In my code when I click on the button, nothing happens.
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
//import com.toedter.calendar.JDateChooser;
public class program1 extends JFrame
  private static final long serialVersionUID = 1;
  static JFrame frame = new JFrame();
  static JButton B1 = null;
  static JTextField tfDateTime = new JTextField(30);
  public static void main(String args[])
    frame.setTitle("JCalendar");
    JPanel mainPanel = new JPanel();
    JScrollPane scrollPane = new JScrollPane(mainPanel);
    //ImageIcon img = Utility.loadIconByName("/images/JCalendarColor32.gif");
    B1 = new JButton();
    mainPanel.setLayout(new GridBagLayout());
    GridBagConstraints a = new GridBagConstraints();
    a.insets = new Insets(0, 10, 8, 0);               //1. Date/Time label and TextField
    a.gridx = 0;
    a.gridy = 1;
    a.anchor = GridBagConstraints.WEST;
    mainPanel.add(new JLabel("1. Date/Time:"), a);
    a.gridx = 1;                           
    mainPanel.add(tfDateTime, a);
    a.gridx = 2;         
    B1.addActionListener(new java.awt.event.ActionListener()
      public void actionPerformed(final java.awt.event.ActionEvent e)
        JDateChooser D = new JDateChooser();
    mainPanel.add(B1, a);
    frame.add(scrollPane);
    frame.setSize(new Dimension(700,200));
    frame.setLocation(200,200);
    frame.setVisible(true);
}I am reading the doc and the JDateChooser() and still can't figure out how to make this work.
How can I get the calendar to show when i click on the JButton (B1) in my code. Would someone please please help me out ?
Thanks in advance

Nevermind, please do ignore this posting.

Similar Messages

  • I have my Calendar app syncing with iCloud.  Every time I open it it says, "Moving Calendars to Server Account..."  It runs and runs and does not stop.  As a result, I cannot access my calendars.  Please help.

    I have my Calendar app syncing with iCloud.  Every time I open it it says, "Moving Calendars to Server Account..."  It runs and runs and does not stop.  As a result, I cannot access my calendars.  Please help.

    I have the same problem, I tried the solution of Dr Cox but that didn't work as he said go to system preference then mail, contacts etc. but I don't have that.  Can someone help?
    Elaine

  • How can I open March 2013 in my iPad-calendar? please help me! Thanks

    How can I Open March 2013 in my iPad-calendar?
    Please help me!
    Thanks
    Susanne Schabel

    I get same Issue.
    is iCloud make this issue.
    Try Disable iCloud calender on you iPad and then go to March 2013 on you calender and then it not crash. after that go back and enable iCloud calender again.
    And then it work for me :-)
    best regards
    Lars Rasmussen

  • How to read a file with value of RAW data type? Please help

    Hi Experts,
       I  have a file with RAW data like DE864E48833BFFF1B805001CC4EF4BFA
       I am using GUI_UPLOAD.
       But this FM is throwing error.
       I tried by giving FILETYPE as ASC. The output internal table for this FM contains a field of type c size 32.
       Now it is able to read the file but I want to assign this value to a RAW data type variable.
       This it is unable to do. How to convert the char value to RAW data type?
    Please help!
    Thanks
    Gopal

    Hi,
    The documentation for the function module contains an example for RAW upload.
                begin of itab,
                      raw(255) type x,
                end of itab occurs 0.
               CALL FUNCTION 'GUI_UPLOAD'
               exporting
                  filetype =  'BIN'
                  filename = 'C:\DOWNLOAD.BIN'
               tables
                 data_tab = itab.

  • I lost my iphone4 and replaced it with a 4s. It's been a year since my last sync. Do I set up my phone as "new" or "restore from backup?" Im hoping game center will automatically have a current record of game data...please help or advise.thx

    I lost my iphone4 and replaced it with a 4s. It's been a year since my last sync. Do I set up my phone as "new" or "restore from backup?" Im hoping game center will automatically have a current record of game data...please help or advise.thx

    Restore from backup.

  • My iPhone 5 will not sync with itunes. Icon does no appear in left hand column. Both iTunes and the iPhone are running the most up to date updates. Please help.

    My iPhone 5 will not sync with itunes. Icon does no appear in left hand column. Both iTunes and the iPhone are running the most up to date updates. Please help.

    Is your iPhone connected to your computer using the lightning cable or are you doing WiFi sync?
    Sometimes the iPhone doesn't show up in the side bar if you're using WiFi syncing, if its not working, then be connected to your WiFi on your phone and on your computer (Same network) let me know how it's going, if it doesn't work still. Turn your phone off and on again and put in your pass code then try to sync it (keep your phone unlocked and not in sleep mode) tel me if it appears in the side bar.

  • An app counting minutes and data use. Please help!!!

    An app counting minutes and data use. Please help!!!

    Here's one, there are others in the App store:
    http://itunes.apple.com/us/app/data-usage/id386950560?mt=8
    However, since your carrier is the one that bills you, the only stats that matter are your carrier's. Some carrier's offer apps that provide this info, see if yours does.

  • Does anyone else all the sudden have probs with the ipod touch calendar?? all the sudden can't add dates to mine, please help!

    Can't insert new events into my calendar...was fine before the new software update but now doesn't work.  please help if you know any fixes.

    Go to Settingds>iCloud and make sure that Calender is turned on.  If yo want to do other things too like adding contacts, make sure those are also turned on.

  • Missing inspection data in QA33.Please help

    After GR, Inspection lot was assigned. But unable to proceed to results recording in QE51N.It says "no entries found". And i could see that there was no inspection data in the lot created. i.e in QA33 the Inspection specifications tab has no data and in Insp. lot quantities tab "sample size" field says 0. I don't know where i was wrong. Please help me.
    Also please explain::
    The master data involved for QM in procurement is :
    we have to create :
    - QM view in Material master and Inspection Type as Active
    - catalog to define attributes
    - MIC to define inspection criteria(like a test case)
    - selected set
    - create sampling scheme, sampling procedures, Dynamic Modification Rules to define sampling criteria.
    - Inspection Plan
    Please correct me if i am missing any mandatory master data here.
    Also please explain how are these connected to each other to Start Quality inspection after a GR for a particular material x in plant P.
    Thanks in advance.

    Hi,
    Please check the inspection lot status  ..if its in "CRTD" (Created) status then you need to make it to "REL"(release) before proceeding (like result recording or UD)..
    Check if the Inspection plan with the correct usage is assigned in the plan concerned for GR  (As there are different usages for production,GR from purchase order,stock transfer etc)..Also see if the Inspection plan is released.
    Again the MIC's you created ,please check if they are also active.  Else see if sample size is assigned correctly
    Hope this helps
    Regards
    George

  • I lost all my data because i reset my mac and i need it back, i created a new account, and i need all my data and documents Please help.

    I Lost all my data because i forgot my password and reset my mac, and i need it all back Please help!!

    What do you mean by "reset my mac"?

  • Internet is not working on cellular data after updating 8.0.2 in iphone 5s , wifi connectivity is fine , but no internet connection error message is start blinking even after cellular data is on , please help .

    I am using iPhone 5s , internet is not working on cellular data even after it is on , wifi is working properly . Please help apple team.

    Hello Mario:
    I'm actually surprised that Apple continues to push out 8.02 without addressing these issues. The problem will only anger more users and certainly finger-poking at Airplane Mode isn't the answer. This is an iOS8 code problem and no amount of 'resetting' is providing a reliable fix/solution that sticks.
    These issues with loss of cell connectivity, apps that have lost functionality, etc., which are all directly associated to the arrival of iOS8, are so widespread in the user community and pervasive within individual iPads that it's clear there are significant fundamental problems with this release. Given the problems are so blatant, it's fair to ask the question of how they got by the Apple validation team.
    What is the status at Apple on rolling out a fully V&V'd version to resolve this?  Respectfully, when it comes to some of my more useful apps, my personal iPad has become a paperweight. The user forums are full of these iOS8 complaints for several weeks and there doesn't seem to be a competent answer from Apple.  Even a "We're aware and we're working on it" would be well received.
    Any hope that you can provide will be appreciated. (I'll be monitoring the thread on my Dell laptop because, well, my iPad is i-Inop!).
    Thanks!

  • Data controller..please help

    hi there, im new to sun studio creator 2..can anyone help me on how to create a table with data controller? can you please send me a sample code if you had one([email protected])....please help....thank you in advance...
    thank you,
    Musika
    Message was edited by:
    Musika

    Hi Msjo,
    I guess we are not on same page. For better understanding of my code, i am putting up both results and bean class here:
    Results.java
    package xxadf.resources;
    import java.util.ArrayList;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpSession;
    +public class Results {+
    ArrayList showresults;
    ResultsBean rb;
    EmpData obj;
    +public Results() {+
    FacesContext fctx = FacesContext.getCurrentInstance();
    HttpSession session = (HttpSession)fctx.getExternalContext().getSession(true);
    rb = new ResultsBean();
    showresults = new ArrayList();
    obj= (EmpData)session.getAttribute("EmpData");
    +}+
    +public void updateResults(String refId, String sensor, String imgLoc){+
    rb = new ResultsBean();
    rb.setApp(obj.getStrApplicationName());
    rb.setName(obj.getStrName());
    rb.setEmpId(obj.getStrEmpId);
    rb.setAddress(obj.getStrAdd());
    showresults.add(rb);
    +}+
    +public void setShowresults(ArrayList showresults) {+
    this.showresults = showresults;
    +}+
    +public ArrayList getShowresults() {+
    return showresults;
    +}+
    ResultsBean.java
    package xxadf.resources;
    +public class ResultsBean {+
    private String empId;
    private String app;
    private String name;
    private String Address;
    +public void setEmpId(String empId) {+
    this.empId = empId;
    +}+
    +public String getEmpId() {+
    return empId;
    +}+
    +public void setApp(String app) {+
    this.app = app;
    +}+
    +public String getApp() {+
    return app;
    +}+
    +public void setName(String name) {+
    this.name = name;
    +}+
    +public String getName() {+
    return name;
    +}+
    +public void setAddress(String address) {+
    this.address = address;
    +}+
    +public String getAddress() {+
    return address;
    +}+
    +}+
    Now am trying to add this bean class to Data Control made by Results.java

  • Delay in event driven log file data writing? Please help!!!

    System Information
    Operating System: XP
    Labview: 8.2
    Force sensor data acquisition via DAQPad-6070E
    Actuator: Actuator via MCS-3D controller
    Programming Information
    Number of events: 13
    Position read: Reads the position and the force sensor data every second.
    Move I &  Forward:  Moves the actuator forward with a define step size
    Two actuators are made to travel certain distance. A force sensor is attached to the system. The aim here is to acquire continuous data as per the defined time wait (1 sec). The data is logged in a text file which gives the position travelled from the actuator, the force sensor data with a time stamp.
    The issues I am encountering is during writing a file.
    For ex: When even is activated ( Move actuator at defined stepsize) the event are logged into the log file but the positions are updated into the log file only when the next event is activated. So it means that the positions and the force values are updated into the logfile after the consecutive event is executed. If you see the logfile ex inside the attachment the red block explains the event executed but the position are updated in the next line (event). This file is just for example.
    Please help here I am going wrong!
    Thanks in advanced
    Attachments:
    EventMoveex.PNG ‏582 KB
    Logfile.PNG ‏64 KB

    Dear Method M
    I find it out what was going on. As you mentioned that I was writing the values before the actuators achieving the final position, so I introduced a delay between the execution of two SubVI's. It isnt a clean method but it works.
    thank you very much!
    Regards
    Itz

  • I reset my apple password but i cannot recieved email on recovery email either on same email which i submit for apple id somebody hacked my apple id please help and worst thing i remembered security quitions but i cant remembered date of birth please help

    i reset my apple password but i cannot recieved email on recovery email either on same email which i submit for apple id somebody hacked my apple id please help and worst thing i remembered security quitions but i cant remembered date of birth please help

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    Also
    If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.

  • After upgrading my iphone to v5 software I have duplicate calendar entries - please help

    After upgrading my iphone to v5 software I have duplicate calendar entries - please help

    Have same issue, reset doesn't help (
    I can delete unwanted photos and albums following way:
    1) Backup all photos from device (Important!!)
    2) Connect to iTunes, enter managing device, select 'Photos' link
    3) Select checkbox Sync Photos from <My Pictures>, choose 'Selected folders' but select NONE of them
    4) Click Apply, agree to Delete All Photos from device
    5) Uncheck 'Sync Photos from', click Apply
    Now i have cleared all previous synced folders, that i unable to delete from device.

Maybe you are looking for