Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

gon to

Greenhorn
+ Follow
since Jan 20, 2006
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 gon to

thanx, i will try this. or maybe i will just open a html file in a webbrowser.

thank you!
16 years ago
mh, this seems a bit oversized for my application. i have only few html sites to display. javahelp would probably be bigger then the actual application. isn't it easier to just display them in a popup window? if yes, how do i do this? i havent much experience with gui stuff...
16 years ago
hi all,
i'd like to create a help menu for my java application (swing gui). this should display some html sites where the functions of the application are explained. what is a good way to do this? it is easy to display html sites in a jframe? for me, it would also be ok to just open a html browser window with the html files. is this easier?

does anyone has a tipp or tut how to do it (good and simple)?

thx gon
16 years ago
yes, thanks. works fine when calling "repaint()" for the frame on which the panels is attached.
16 years ago
i took a look at the cardLayout but i'm not sure if it is the thing i need. i don't have a fixed number of JLabels which are exchanged, but JLabels are dynamically created (dependend of where the user clicks) and attached. everytime the user clicks, the panel should be cleared and a new set of Jlabels should be created and attached to the panel.for this purpose it seems rather complicated to me to use cardLayout.

the second proposal is not working, same problem as before...
i wonder why the panels content is not cleared by validate() or revalidate()?
16 years ago
hi all,
i have a jpanel with jlabels added. i would like to change the panels content. unfortunately the old labels don't disappear. how can i clear the panel properly? this is my attempt which is not working:



thank you! gon
16 years ago
yes, thank you! pretty easy...
16 years ago
hi all,
my java gui has a 'save as' popup. now i would like to have a proposed filename in it. how can i insert the filename? here's how i create the popup:



thanks all,
g
16 years ago
hi all,
i got a jdom document, which looks like this:

<elem1>
<sub1>
<subsub1/>
</sub1>
</elem1>

now i'd like to remove the rootelement (elem1). the output i want is:

<sub1>
<subsub1/>
</sub1>

but how can i achieve this? thanks in advance...
right, that's why i need to draw the tree from upside down. later, i will have to add another variable "number of children" of each node. with this variable the radius of each "cloud /circle" of childnodes can be calculated.

but first, i want to get the shifting in z-pos working. it seems like my recursion does not work correct. it should nest the childnodes into their parentnodes, which it apparently does not, because when a node with relative z-pos 10 is _in_ another node, it has the relative position 10 to its parent. with the method from my first posting it works fine, but there i cannot add the variable "number of children" to calc the radius (x,y). that's why i turned it around to start from upside down, see my 3rd posting. but now it doesn't work anymore.

i think is has to do with setting the new child as parentnode. do i have to modify this part of the method when turning it around?
[ March 08, 2006: Message edited by: gon to ]
16 years ago
yip! that's exactly what i meant. thank you. but now i dont get where to set the child of the current point as the parent, so that each childelement becomes a childpoint of its parent point?!
in the following code, children of a point should be shifted -10 in z-position relatively to their parent. but all points are in the same position... what's wrong with this code? seems like the points are not nested, but why?



ps:
grappa is interesting, but i want to create a conetree in a a vrml-scene. at first sight it seems that grappa isn't suitable for this...
16 years ago
i'm using jdom. is this possible with jdom? is it a standard proceeding to do xml-parsing backwards, because i thought maybe recursion would do this for me? do you know any examples which do this?
16 years ago
i am not very fit in recursion. hope someone can help me. here's my prob:
i traverse an xml-structure recursively to draw a conetree (3dimensional graph) from it, see picture. for each xml-node a point in a 3dimensional space is drawn. to calculate the radius of a circle of nodes, i need the radii of its subcircles. (otherwise the circles could overlap).
i don't get how i can manage this in my recursion. i would have to traverse the xm-file backwards to start drawing the tree at the bottom, right? but recursion starts at the beginning of the xml-file, doesn't it?

basically my question is: how can i manage to know a variable of a recursion level below? hope my problem is clear.

this is my recursive method:



thanx in advance!
16 years ago
thats it, thanks very much!
16 years ago
hi all,
i got an array question. i'd like to create a new array and append nodes to it in a loop, like this:

16 years ago