🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #26860

Re: repintar en un panel

#26860
From: Jonathan Revusky
Date: Wed, 25 Nov 1998 00:00
53 lines
2053 bytes

Carlos wrote:
> 
> Gracias por intentar resolver mi duda, pero no me funciona. Te paso el
> codigo que he utilizado, y te menciono que utilizo JBuilder 1.0
> Client-Server.
> 
>       BevelPanel panel = new BevelPanel() {
>          public void paint(Graphics g) {
>             g.drawRect(1,1,8,8);
>          }
>       };
> 
> Si el panel tiene como constraints NORTH, se coloca ocupando el frame entero
> cuando pinta el panel.

Es cuesti�n de entender los LayoutManager. Por defecto, el Frame tiene
el LayoutManager BorderLayout. 

Prueba con el FlowLayout.

Y tambi�n piensa en reimplementar los m�todos getPreferredSize(),
getMinimumSize() o getMaximumSize() de BevelPanel si quieres controlar
mejor el tama�o. Por ejemplo:

 
       BevelPanel panel = new BevelPanel() {
          public void paint(Graphics g) {
             g.drawRect(1,1,8,8);
          }
          public Dimension getPreferredSize() {
             return new Dimension(9,9);
          } 
       };
 



> 
> � Sabes a que puede ser debido ? � Es problema de la herramienta que estoy
> utilizando ( JBuilder ) ?

No creo. No tiene nada que ver con usar JBuilder. Es cuesti�n de
entender el mecanismo de los LayoutManager.


Jonathan Revusky
-- 
available for Java and Delphi Consulting
Make your .class files double-clickable
with SmartJ
http://www.bigfoot.com/~crystalline.solutions
Technical Details
Message-ID: <365C5744.7ACABDCD@jet.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <73c3i5$hf2$1@talia.mad.ibernet.es> <36599671.A12D0BD7@jet.es> <73hgej$c29$1@talia.mad.ibernet.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,baa818ff7f3f9df0
X-Google-Attributes: gid1116f3,public
From: Jonathan Revusky <jrevusky@jet.es>
Subject: Re: repintar en un panel
Date: 1998/11/25
Message-ID: <365C5744.7ACABDCD@jet.es>
X-Deja-AN: 415666625
Content-Transfer-Encoding: 8bit
References: <73c3i5$hf2$1@talia.mad.ibernet.es> <36599671.A12D0BD7@jet.es> <73hgej$c29$1@talia.mad.ibernet.es>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
Organization: Telefonica Transmision de Datos
Mime-Version: 1.0
Reply-To: jrevusky@bigfoot.com
Newsgroups: es.comp.lenguajes.java