Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Kevin Jaffe

Greenhorn
+ Follow
since Jun 07, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin Jaffe

I need to step through some complicated code in the javax.swing and
javax.swing.tree packages using a debugger, but I have not been able
to find a debuggable version of the jdk-1.3.1 distribution.
Therefore, in a desperate move, I made a new rt.jar file including the
classes of interest recompiled with the -g flag. (I included print
statements in the sources prior to recompilation, to serve as
indicators that these were the class files that were actually being
loaded by the debugger.) I started the application under the jdb
debugger and set breakpoints in the recompiled jdk code, right at the
newly added print statements, but jdb ignored these breakpoints. It
did not complain or announce that it was stepping over these
breakpoints; it just silently stepped right over them. (The printing
by the inserted statements happened as expected.)
The question is why does jdb behave in this way?
Thanks,
KJ
19 years ago
Where can I download a debug version of jdk-1.3.1? I want to be able to step through jdk source while debugging with jdb.
Thanks!
KJ
19 years ago
I need a development environment that can easily generate a trace of
all the method calls (including those that happen within standard JDK
1.3.1 library classes), during a typical interactive session with a
Swing GUI. Does anybody know of one?
Thanks,
KJ
[ I'm not sure if this is an "intermediate Java" or "beginner Java"
topic, so I'm reposting it here. ]
How can I generate a trace of all the method calls (including those
that happen within standard JDK 1.3.1 library classes), during a
typical interactive session with a Swing GUI?
Thanks,
KJ
19 years ago
[ I'm not sure if this is an "intermediate Java" or "advanced Java"
topic, so I'm reposting it here. ]
How can I generate a trace of all the method calls (including those
that happen within standard JDK 1.3.1 library classes), during a
typical interactive session with a Swing GUI?
Thanks,
KJ
19 years ago
How can I generate a trace of all the method calls (including those
that happen within standard JDK 1.3.1 library classes), during a
typical interactive session with a Swing GUI?
Thanks,
KJ
19 years ago
We have some data that, after long debate in our group, we have
decided to represent using a JTree (i.e. this choice is a hard
constraint on further design).
The nodes of this tree fall into disjoint sets, each set consisting of
up to about 10 elements. For any node in the tree, the other nodes
that belong to the same set can be dispersed widely all over the tree.
The problem is to modify the functionality of JTree so that
selecting/deselecting one node automatically selects/deselects all the
nodes in the same set.
What's the best way to modify this behavior? Where does the code
responsible for highlighting selected nodes reside?
Thanks,
KJ
19 years ago
With JTree, when a node's descendant is selected (i.e. highlighted),
and then the node is "closed", the descendant becomes deselected and
the node itself becomes selected. If the node is then re-opened, it
remains selected, while the formerly selected descendant remains
unselected. In other word, JTree forgets that a descendant is
selected when an ancestor is closed.
Is there any way to get JTree to remember all the selected nodes, even
while ancestor nodes are closed?
Thanks!
KJ
19 years ago
Can someone please explain to me Java Swing "data models"? I've tried
the tutorial and a couple of books, but the whole thing remains pretty
incomprehensble and mysterious to me. In particular, what's the
rationale for introducing these "data models". Is there a simple
example that shows a design problem that is solved by introducing data
models?
And what is the conceptual relation, for example, between a
MutableTreeNode and a MutableTreeModel?
Thanks!
KJ
19 years ago
hi!
how do i map a mouse motion to the virtual coordinate space?
i have tried to use getPixelLocationInImagePlate, but i get
the results that seem wrong to me, although this may be
because i am confused about things such as "image plate",
"center eye", "screen"...
i set the ViewPlatform transform to:
1.0, 0.0, 0.0, 0.0
0.0, 1.0, 0.0, 0.0
0.0, 0.0, 1.0, 1.0
0.0, 0.0, 0.0, 1.0
(i.e. put the image plate at z=1.0), and I make a Box with dimensions (0.1, 0.1, 2.0). my understanding was that this
would put the corners of the box that are at z=1.0 right at
the image plate, and therefore that if i clicked at, say, the upper righthand corner with the mouse and converted to virtual world coordinates, i should recover (using getPixelLocationInImagePlate and getImagePlateToVworld) i would recover (0.5, 0.5, 1.), but i don't. i get
(0.5546875, 0.5234375, -1.4142135623730954)
the z-coordinate is not a worry (getPixelLocationInImagePlate always returns a z-coordinate of 0. for some reason). but i can't figure out why the x and y coordinates are not both much closer to 0.5.
strangely, the transform returned by getImagePlateToVworld() is
27.68208661417323, 0.0, 0.0, -6.4140625
0.0, 27.68208661417323, 0.0, -5.210937500000001
0.0, 0.0, 27.68208661417323, -1.4142135623730954
0.0, 0.0, 0.0, 1.0
which makes no sense to me; i expected the m23
component to be 0.0 instead of -1.414... besides
there is no reason for this factor of sqrt(2) to
crop up, since i set the image plate to z=1.0, not
to the "nominal" z of 1+sqrt(2).
the only think that is clear is that i am thoroughly
confused!
any help would be greatly appreciated!
thanks!
kj
19 years ago
I am trying to learn the Java 3D API using the tutorial offered at
Sun's site
http://developer.java.sun.com/developer/onlineTraining/java3d/
but I am finding that the information in this tutorial is *completely*
at odds with the 3D API documentation at
http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_2_API/j3dapi/index.html
For example, on p. 1-12 the tutorial refers to the method
setNominalViewingTransform() of the ViewingPlatform class of the
com.sun.j3d.utils.universe package. I can't find any of these items
at the 3D API documentation site above. The only packages listed at
this site are javax.media.j3d and javax.vecmath. I did find a
ViewPlatform class (not ViewingPlatform) in a different package
(javax.media.j3d), and it doesn't have the method
setNominalViewingTransform.
I gather that the Tutorial is so grossly outdated as to be completely
useless. Is this impression correct? If so, is there any other way
to learn the 3D API?
Thanks!
KJ
19 years ago
My question 1 is: how can I make an applet that spawns its own
separate window? The effect I'm after is that when the applet is
loaded by the browser, it spawns a separate small window (without
any of standard browser buttons: Back, Forward, etc.), in which
it runs. The aim is to let the user keep the applet unotrusively
around while he/she continues browsing. How is this done?
My question 2 is: assuming that the behavior described in
question 1 is possible, is it possible for the applet to query
the browser to find out the URL the browser is currently
visiting?
My meta-question: which of the dozens of Java books would have
the answer to this question? Is there an "advanced" applets
book out there? (My search of Amazaon was not fruitful.)
Many thanks!
KJ
19 years ago
I'm getting the error
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)...
when I try to load an applet to Netscape 4.61 off one of my
subdirectories. The line that triggers the error is
new Thread(this).start();
The problem seems to have something to do with the location of
the class files, because I have no problem loading the applet
when the class files are in a subdirectory in the JDK
installation tree (/usr/local/jdk1.3.1). Also, the applet
performs fine if I run it using appletviewer, even off my
subdirectory.
Can someone guess why I'm getting this error?
Thanks!
KJ
p.s. The full error message is:
java.security.AccessControlException: access denied (java.lang.RuntimePermission
modifyThreadGroup)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at sun.applet.AppletSecurity.checkAccess(AppletSecurity.java:139)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:279)
at java.lang.Thread.init(Thread.java:265)
at java.lang.Thread.<init>(Thread.java:345)
at XYZApp.start(XYZApp.java:346)
at sun.applet.AppletPanel.run(AppletPanel.java:358)
at sun.plugin.navig.motif.MotifAppletViewer.maf_run(MotifAppletViewer.java:127)
at sun.plugin.navig.motif.MotifAppletViewer.run(MotifAppletViewer.java:1
23)
at java.lang.Thread.run(Thread.java:484)
19 years ago
Where can I download a free sample SCJD assignment (preferably
with answers) from? I know that I can just download the real
assignment from Sun, but at the moment $250 is a bit difficult
for me to pay, and I would like to start preparing for the SCJD
right away.
Thanks,
KJ

------------------
[This is surely a FAQ, but the site's FAQ list doesn't load up properly for some reason (I just see source).]
What's the best way to prepare for the Developer exam?
(I am definitely jumping the gun here, because I'm still studying
to take the Programmer exam, but even now I want to keep my eyes
open for anything that will be important in the Developer exam.)
If this question has been answered a billion times, please
accept my apologies and let me know where I can find those
answers!
Regards,
KJ