[4528] in java-interest

home help back first fref pref prev next nref lref last post

Re: Embellishment problem -- what am I doning wrong?

daemon@ATHENA.MIT.EDU (Sami Shaio)
Fri Jan 5 00:29:16 1996

Date: Thu, 4 Jan 1996 20:06:27 -0800
From: Sami.Shaio@Eng.Sun.COM (Sami Shaio)
To: java-interest@java.Eng.Sun.COM, chris@tkna.com

Your Border class is completely obscured by the Component it has
at the center. You need to override the insets method to return the
size of the border you want around the enclosed component. For example,
if you want a uniform 5 pixel border you would define Border.insets as

	Insets insets() {
		return new Insets(5, 5, 5, 5);
	}


--sami


|From chris@tkna.com Thu Jan  4 15:15:17 1996
|Date: Wed, 3 Jan 1996 11:10:22 -0500
|From: chris@tkna.com (Christopher Helck)
|To: java-interest@java.Eng.Sun.COM
|Subject: Embellishment problem -- what am I doning wrong?
|X-Sun-Charset: US-ASCII
|X-Info: To unsubscribe, send 'unsubscribe' to java-interest-request@java.sun.com
|
|
|When the applet runs the button "Center" appears and works, the red rectangle
|is never drawn. I've added print statements and discovered that Border's paint
|method is never called. Why?
|
|Thanks,
|
|C Helck    chris@tkna.com
|-
|This message was sent to the java-interest mailing list
|Info: send 'help' to java-interest-request@java.sun.com
|
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post