classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asking our experts on Swing.


From: Robert Schuster
Subject: Re: Asking our experts on Swing.
Date: Thu, 03 Nov 2005 14:17:45 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20051005

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Audrius,
I am not a swing expert but I suggest you to add a beanshell console to your
game. That way you can inspect the variables (even private stuff) at runtime.
That could help to describe an erroneous state more easily.

Btw: One can live debug such application with BshBot. You do not even need ot
make any changes to your program. Just add all the appropriate jars and
directories (the things the application needs and the other stuff for bshbot)
into the classpath and start the fun.

The run a command like this:
cl = Class.forName("mainclass of your application");
cl.main(new String[] { "whatever", "you", "need", "here" });

With

setAccessibility(true);

one can switch of access checks to private, package-private and protected stuff.
This is great to inspect variables and/or call internal methods.

BshBot source code is now permanently available on my universities account:
http://www.inf.fu-berlin.de/~rschuste/java/bshbot.tar.bz2

cu
Robert aka beanshellfan ;)

Meskauskas Audrius wrote:
> This evening I first tried my two player CORBA game. The CORBA works,
> the socket works, the layout and mouse events are ok - but,
> unfortunately, the supplementary chatting feature does not work just
> because it is not possible to put any text into the JTextField.
> 
> The JTextArea is cleared after sending the message by
> JTextField.setText(''"). After I call this method in our Classpath, it
> refuses to accept any keyboard input, despite I see the cursor.
> Experimenting, I tried to call JTextField.setText(".....") instead. In
> this case it was possible to enter the text inside the dotted area (the
> dots were shifting to the right as expected), but not possible to enter
> any additional text after clicking outside the dotted area (but still
> inside the text input field).
> 
> It seems that the mouse click right from the area that is already filled
> in with some text is ignored instead of placing the carret to the end of
> text and allowing the text input. Basically this means that the
> JTextField cannot perform one of the main its functions: being initially
> empty, become focused after the mouse click and then accept the input data.
> 
> Does anybody already knows about this problem or could suggest some
> workaround how to force the input work? On Sun's jre, the program runs
> without problems.
> 
> Audrius
> 
> 
> 
> 
> _______________________________________________
> Classpath mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDag35G9cfwmwwEtoRAr71AKCCmlVnZncKPz1S/yMjMzadR8qzkACdHNMP
jnagJN+piu+QFRt8Sc9evPg=
=13py
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]