RE: Advanced-swing digest, Vol 1 #262 - 2 msgs

2001-12-07 Thread Preeti Pujni



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 4:33 PM
To: [EMAIL PROTECTED]
Subject: Advanced-swing digest, Vol 1 #262 - 2 msgs


Send Advanced-swing mailing list submissions to
[EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
http://eos.dk/mailman/listinfo/advanced-swing
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than Re: Contents of Advanced-swing digest...


Today's Topics:

   1. RE: Tiling a background image (Frank D. Greco)
   2. RE: JTextArea (Samivelu, Srinivasan)

--__--__--

Message: 1
Date: Thu, 06 Dec 2001 09:17:05 -0500
To: [EMAIL PROTECTED]
From: Frank D. Greco [EMAIL PROTECTED]
Subject: RE: Tiling a background image
Cc: [EMAIL PROTECTED]

At 03:30 PM 11/30/2001 -0800, Ken Miller wrote:
 Ok, I got the tiled image to appear by adding it to the desktop and making
 the panel size sufficiently large enough.  I set it to 2000,2000 so that
it
 would always take up the entire window even if it's resized to the whole
 screen.

You should scale the background image to the size of the
JDesktopPane
in its paint method instead.  There is an overloaded drawImage()
that
helps with this.  Or come up with a simple tiling algorithm
yourself to use.

 The problem now is that any JInternalFrame that is placed onto the desktop
 and moved or later closed, writes over the tiled background.  So I guess I
 need some way to make sure that the desktop gets repainted whenever any of
 the JInternalFrames are moved or closed.  Does that mean I have to capture
 the event of any JInternalFrame and force it to redraw the desktop when it
 is resized, moved or closed?

Almost.  Capture the events of the JDesktopPane instead.  Scale the
image when you resize or open, but don't scale when you just get
any other repaint requests (rescaling is painfully slow).

However, if you put a JDesktopPane within your JDesktopPane
(ie, a JInternalFrame with its own JDesktopPane... with its
own JInternalFrame's), all kinds of funky things happen.
I make the reference to my background image
a static shared by all instances of a JDesktopPane, but repainting
(as
I describe above) is quite weird.  The inner JDesktopPane scales
properly
when I resize it, but when there's internal window damage, it
draws
the background image at the scale of the outer JDesktopPane.

Very weird behavior.  I had to disable the ability for inner
JDesktopPane's
to have background images unfortunately.  :(

Btw, we're building a cool collaborative environment that works over
HTTP...
fun stuff.

Frank G.
+==+
| Crossroads Technologies Inc, 55 Broad Street, 28th Fl, NYC, NY 10004 |
|  Enterprise Java Engineering |
| Email: [EMAIL PROTECTED] Web: www.CrossroadsTech.com |
| Pager: 800-495-6244   ePager: [EMAIL PROTECTED] |
| Voice: 212-482-5280 x229 Fax: 212-482-5281   |
+==+



--__--__--

Message: 2
From: Samivelu, Srinivasan [EMAIL PROTECTED]
To: 'Steve Barrett' [EMAIL PROTECTED], '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
Subject: RE: JTextArea
Date: Thu, 6 Dec 2001 16:10:34 +0100 

Dear Steve Barrett

Thanks for the solution. but i wanted something like this. In a panel i have
two textarea fields and four textfields
when i traverse the fields using the tab key, I want the focus to come out
of the textarea when i press tab key. But what happens is 
pressing the tab key insdie the textarea is it moves by a tab space. I want
override this feature. Like whenever i press the tab key it should move to
the next focussable component. Any idea or workaround would be of much help
to me.

wkr
Srinivasan




-Original Message-
From: Steve Barrett [mailto:[EMAIL PROTECTED]]
Sent: 05 December 2001 09:58
To: Samivelu, Srinivasan
Subject: Re: JTextArea


one solution would be
  jta = new JTextArea () {
public boolean isFocusTraversable () { return false; }};

--- Samivelu, Srinivasan [EMAIL PROTECTED] wrote:
 Dear All
   I am using JTextArea in my program. The textarea is non editable.
 And  when I press the tab key i want the focus to be moved to the
 next
 focussable component. 
   Any workaround or code snippet to set the focus to the next
 focussable component on clicking the tab key.
 
 Thanks in advance
 Srinivasan
 ___
 Advanced-swing mailing list
 [EMAIL PROTECTED]
 http://eos.dk/mailman/listinfo/advanced-swing



cellBackground in JTable

2001-12-07 Thread Jaime Yeckle




Hello -
Is there an easy way to set 
the background cell color forselected cell (only this cell, when is 
selected ) in a JTable .Please help me
Thanks, 
Jaime


RE: cellBackground in JTable

2001-12-07 Thread Pepelis, Aaron



just 
looks the class DefaultTableCellREnderer (I thnk that's it's 
name)
and 
there's a function in there called getComponent blah blah 
balh.
inside 
of that, you can figure out if ti's the cell that you want to have a differetn 
color and color it up differently.
remember, the defaultCellREnderer is just extended from a 
JLabel.
so you 
can do what ever youcan to a label to it.
aaron

  -Original Message-From: Jaime Yeckle 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, December 07, 2001 2:53 
  PMTo: Pepelis, AaronSubject: cellBackground in 
  JTable
  Please, would you explain me how 
  make a custom cell renderer, or give me an example.
  
  Thanks in advance
  
  
- Original Message - 
From: 
Pepelis, Aaron 
To: 'Jaime Yeckle' 
Sent: Friday, December 07, 2001 3:42 
PM
Subject: RE: cellBackground in 
JTable

you have to write a custom cell renderer
aaron

  -Original Message-From: Jaime Yeckle [mailto:[EMAIL PROTECTED]]Sent: 
  Friday, December 07, 2001 2:42 PMTo: Help 
  JavaSubject: cellBackground in JTable
  
  Hello -
  Is there an easy way to 
  set the background cell color forselected cell (only this cell, 
  when is selected ) in a JTable .Please help 
  me
  Thanks, 
  Jaime


JCheckBox in a jtree

2001-12-07 Thread Aradhana Singh



Hi All,
I want a Jcheckbox in a all the nodes of the jtree,
The problem i'm facing is that i am able to select only one
checkbox
at a time, checking one of them deselects the other
How do i avoid that

___
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing