Article View: borland.public.jbuilder.java.swing
Article #7597Re: Doubts with Interface Control
From: Torsten Welches
Date: Mon, 22 Jan 2001 15:40
Date: Mon, 22 Jan 2001 15:40
36 lines
2385 bytes
2385 bytes
Edilmar, >1) How to disable the editing into JTable. I would like JTable >became only for display, not editing. I try: >"jtable1.setEnabled(false);" but it didn't work. That *should* work. An alternative would be to use a read-only TableModel (i.e. isCellEditable returns false for all cells). >2) How to define explictly the field size, because my users >will use a 640x480 resolution and I would like to define in a >static way the fields size, like Delphi does. not that I'd recommend it, but check this: http://java.sun.com/docs/books/tutorial/uiswing/layout/none.html >3) How to set focus for some defined field when applet starts. >I'd like to focus a TextField but it isn't the first field of >the applet. I'd like something like Delphi "Edit1.SetFocus". JComponent.requestFocus() Note that this only works if your component is already visible. So it will *not* work for the "first field problem". Rather the applet.add(firstTextField) (or whatever container the text field resites on) line must appear before any other components have been added to this container. (This has nothing to do with the visual order, only focus order). >4) How to force uppercase into a JTextField. use an appropriate Document: http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation Torsten
Technical Details
Message-ID:
<3a6c5472$1_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!sn-xit-04!supernews.com!xfer13.netnews.com!netnews.com!newsfeed.skycache.com!Cidera!news-hub.cableinet.net!Quza.UK.peer!nntp.gblx.net!merapi!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!207.105.83.65References:
<3A6C3C84.16EA3A4F@intersite.com.br>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,c0586080b2ccf738 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-22 07:45:47 PST From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Sender: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Reply-To: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Subject: Re: Doubts with Interface Control Newsgroups: borland.public.jbuilder.java.swing X-User-Info: 193.158.55.74 193.158.55.74 References: <3A6C3C84.16EA3A4F@intersite.com.br> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3a6c5472$1_1@dnews> Date: 22 Jan 2001 07:40:34 -0800 X-Trace: 22 Jan 2001 07:40:34 -0800, 207.105.83.65 Lines: 37 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!sn-xit-04!supernews.com!xfer13.netnews.com!netnews.com!newsfeed.skycache.com!Cidera!news-hub.cableinet.net!Quza.UK.peer!nntp.gblx.net!merapi!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!207.105.83.65