pls fix with instructional comments



import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.Calendar;


public class MyClock {
Calendar now = Calendar.getInstance();
int h = now.get(Calendar.HOUR_OF_DAY);
int m = now.get(Calendar.MINUTE);
int s = now.get(Calendar.SECOND);

private JTextField _timeField;

public void showClock(){
_timeField = new JTextField(5); // create display
_timeField.setEditable(false);
_timeField.setFont(new Font("sansserif", Font.PLAIN, 48));

JPanel content = new JPanel(); // put time in display
content.setLayout(new FlowLayout());
content.add(_timeField);

}

/**
* @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.
.



Relevant Pages

  • Re: take a look ... its basic but its mine, all mine!!!
    ... int second = calendar.get; ... public static void addToBox ... Sometimes I'm in a good mood. ...
    (comp.lang.java.help)
  • last version
    ... i'm trying to make it draggable with a slider to set the fonts. ... public static void main ... int fontSize = source.getValue; ... Sometimes I'm in a good mood. ...
    (comp.lang.java.help)
  • Re: last version
    ... public static void main ... JSlider slider = a.getSource; ... int fontSize = source.getValue; ... Sometimes I'm in a good mood. ...
    (comp.lang.java.help)
  • could i pls get sum hlp w/this???
    ... public class MyClock{ ... public static void showClock() ... int m = now.getMinutes; ... Sometimes I'm in a good mood. ...
    (comp.lang.java.help)
  • Re: Multithreading / Scalability
    ... int thread_number; ... catch (InterruptedException e) ... public static void main{ ... every increase in threads reduced the number of calculations that could be performed although again not as dramatically as I expected with the increase in number of threads. ...
    (comp.lang.java.programmer)