pls fix with instructional comments

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • llloyd wood

    pls fix with instructional comments

    import java.awt.*;
    import java.awt.event. *;
    import javax.swing.*;
    import javax.swing.eve nt.*;
    import java.util.Calen dar;


    public class MyClock {
    Calendar now = Calendar.getIns tance();
    int h = now.get(Calenda r.HOUR_OF_DAY);
    int m = now.get(Calenda r.MINUTE);
    int s = now.get(Calenda r.SECOND);

    private JTextField _timeField;

    public void showClock(){
    _timeField = new JTextField(5); // create display
    _timeField.setE ditable(false);
    _timeField.setF ont(new Font("sansserif ", Font.PLAIN, 48));

    JPanel content = new JPanel(); // put time in display
    content.setLayo ut(new FlowLayout());
    content.add(_ti meField);

    }

    /**
    * @param args
    */
    public static void main(String[] args) {
    showClock()
    // all in main, not cool


    }

    }

    b

    --
    Sometimes I'm in a good mood.
    Sometimes I'm in a bad mood.
    When all my moods have cum to pass
    i hope they bury me upside down
    so the world can kiss me porcelain,
    white, Irish bottom.
Working...