[TriLUG] possibly OT: java question

Robert Dale robdale at gmail.com
Tue May 31 20:29:12 EDT 2011


On TriJUG this would be completely on-topic.  I don't see a difference
in any name changes, so I think you might have a difference in your
classpath and that perhaps you're not executing the code you think
you're executing.

On Tue, May 31, 2011 at 6:07 PM, Joseph Mack NA3T <jmack at wm7d.net> wrote:
> I'm teaching myself java (again) and am pretty clueless.
>
> I have two similar files; one produces a border around a frame and one
> doesn't (but I thought it would). Here is the minimum code that reproduces
> the problem.
>
> code that doesn't produce a border
>
> ----
> //DisplayClock.java
> //
> //to run
> //
> //javac DisplayClock.java
> //java DisplayClock
>
> import javax.swing.JFrame;
>
> public class DisplayClock extends JFrame{
>
>        public DisplayClock(){
>        } //default constructor
>
>        public static void main(String[] args) {
>
>                DisplayClock frame = new DisplayClock();
>                frame.setSize(300,200);
>                frame.setVisible(true);
>
>        } //main()
>
> } //DisplayClock
>
> -------
>
> If I change the string "Clock" to "Caock" (and change the filename), I get
> the expected border. Here's the results from some other strings.
>
>
> Border     Noborder
> Caock      Clock
>           Plock
>
> The code is from a book by Liang. When I download his code, I don't get the
> border either, but his other JFrame examples all produce borders.
>
> I get the problem with jdk 1.5 and 1.6
>
> Any idea what's going on?
>
> Joe
> --
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant map
> generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
> --
> This message was sent to: Robert Dale <robdale at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> http://www.trilug.org/mailman/options/trilug/robdale%40gmail.com
> TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions
>



-- 
Robert Dale



More information about the TriLUG mailing list