Robert Ploch

Greenhorn
+ Follow
since Jun 05, 2002
Merit badge: grant badges
For More
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 Robert Ploch

Hi
Imagine i had these classes:
class myApplet extends JApplet{
JPanel x = new myPanel();
JPanel y = new my2Panel();
}
class myPanel extends JPanel {
JButton button = new JButton();
}

class my2Panel extends JPanel {
draw();
}

Now when a user hits the button in myPanel, can i directly access the draw-method in my2Panel?
I would try using the getContentPane()-method, but dont know if it works and how...
Is it possible?
Maybe this diagram would help, this is the big brother of the situation described above:
http://www.robertploch.de/Files/diagram.pdf
(in the diagram it is Gui=myApplet and the surrounding Panels are myPanel,my2Panel and so on)
With regards
Robert Ploch
19 years ago
Thanks so far for your suggestions.
@wally
Is the whole servlet-story difficult to implement? We only have 2-3 weeks time for that, without any experience in database-design ans so on.
It is also very hard to find sourcecode for this adventure, does anybody have some examples?
19 years ago
Hi
We have to create a game as JApplet. This Applet should load the levels/tasks from the project-page level by level, not instantly when the game starts.
The Applet should also load Hiscores while loading the game and save them after finishing the game into a database.
The main problem is, that we dont exactly know which technology to use.
We don`t have much experience in databases and connection-based programming, therefore it need`nt be fast. The maximum number of players is estimated about 100 at time.
Could you give me the best option for this problem? We discussed implementing a SQL-DB, which would fit our interests(and retrieving the stats) best.
Or does a better version exist?
With regards
Robert
19 years ago
Hi
I`m coding a little Tool, for a manufacturer of glasses, which draws some specific points calculated by the parameters given.
These parameters are in millimeter-format, parsed to double-values. All calculations are done in mm.
Now i want to draw a preview using these calculations onto a canvas-screen (800*550).
What is now the best method to convert these double`s to coordinates?
The preview doesn`t need to be exact, but i also want to print these graphics, and therefore the values MUST be exact.
Thanks for ideas
20 years ago
i think i`ve got the error
i programmed another, still unready file in the same directory as Graph.java
javac compiled everything and only showed some errors in the unready file.
now i`ve deleted the file and some errors in graph.java were born
ok, now bugfixing
thx for helping
20 years ago
thanks, but the variables do have the name`s: Edges & Nodes;
the class`s names are Edge & Node, without 's', so it should`nt come to an error ( i hope )
20 years ago
Thanks for the explanation of global variables. I screwed some definitions
I tested your hint, but the compiler (newest version) still posts this error. It doesn`t depend only on the Vector-Class, the compiler is already complaining about the int with the same error.
It also confuses me, because i didn`t do it different than all the times before.
But see yourself
You`ll find the files on:
www.robertploch.de/files/Node.java
www.robertploch.de/files/Edge.java
www.robertploch.de/files/Graph.java
[ May 19, 2003: Message edited by: Robert Ploch ]
20 years ago
Hi
I`m developing at the moment this class ( a graph containg nodes and edges etc.)

Why is it not possible to declare the global variables as private?

Graph.java:3: modifier private not allowed here


thx for answers
Robert Ploch
[ May 19, 2003: Message edited by: Robert Ploch ]
[ May 19, 2003: Message edited by: Robert Ploch ]
20 years ago
Within the FTP-Protocol there is the ability to send files directly from server to server, e.g. you connect to both servers, select the file on one server and the destination directory on the other server, then click transfer and the file is being sent directly to the destination without being downloaded first to my pc and uploaded afterwards to the destination server. thus you can "save" your bandwith and use the hi-speed connections from webspace-hosts etc.
Hi
I just tried to create a small programm which is able to send Files from one Server to another without beeing (temporarily) downloaded to my PC.
Is this possible to do with the plain java-sources?
thx, the tokenizer helped me out
21 years ago
Hi
I want to import the following values into my applet:

since they are treated as strings by default, they must be converted into double and copied into an array.
the problem is:
[code]
double[] RohDaten = new double[ Werte ];
for ( int i = 0; i < RohDaten.length; i++ )
{
String temp = getParameter( "data" );
RohDaten[ i ] = Double.valueOf( temp ).doubleValue();
}
initializes the whole value for every i.
thats why Double.valueOf(String) doesnt work. is there another short method to do this?
thx for helping
21 years ago
thx, the error doesnt occur now
21 years ago
Hi
I want to create a program, which is able to store some numbers into an array. This array, which was filled in the main-method, is to be transported to a sort-method, where the array sorts the integrated numbers using some loops.
But if i want to return the sorted array back to the main overwriting the old array, the following errors occurs:

here is the whole program, the main is not complete yet, sorry for german docs

thx for help
21 years ago
thx jamie, numberformat1 was the right one, i had to modify it a littlebit cause an introducing '+' would return a wrong result, seems to be a problem in java
21 years ago