Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Ben Cramphorn

Greenhorn
+ Follow
since May 13, 2004
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 Ben Cramphorn

Thank you and apologies for the late reply.
5 years ago
Basically want to add an additional label to a gui of mine. I currently have a Jpanel with box layout. Added two components, a small button panel and a table at the bottom.

What I need to do is to add a label with some text and instructions on the left hand side of the button panel but for some reason it keeps on messing up and going ontop of the button panel instead of next to it. Here is my code...

http://www.rafb.net/paste/results/1HRn2O75.html

What I want is for the final appearence to look like this...



Any ideas? Also I need to keep a border of 10 between all items and need to keep the beveled outline.

Hope you can help?

Thanks..
14 years ago
Thanks alot... got my first "hello world" program working a minute ago. It's always exciting when you do something completely new for the first time and setting up the development framework is the most important part to me,,,,
15 years ago
Thanks for the response.

How come some of the Java Programs (mainly games) I download onto my PDA run straight away with no need for a JVM?
15 years ago
For a project at Uni I am writing a basic program for a PDA using J2ME.

The project is going to take some while to do and am a complete novice with programming on a PDA.

So I'd just like to know what programs I need to install on my PDA? Do I need a virtual machine or will it be included already with my PDA.

Secondly, I imagine I need to compile on my Pc then transfer it over, is that true?

How do I execute any applications I produce. Baring in mind in the past I have only ever made console and gui applications for windows run using the "Java application.class" method of running my programs.

Thanks for the help....
15 years ago
JMF looks good. I'll try that. Thanks alot.

As for naming conventions. Why not just set screen names at registration. I have seen loads of posts telling people off for having inappropiate names so I don't know why they even have the option to change it in the first place?
15 years ago
Hello.

Try looking up file.list() on the API.
15 years ago
Why not just populate an array of "Rooms" from a text file or something.

Example for each room would have a line in the text file something like...

1, "Some room description here", NO_EXIT, NO_EXIT, 3, 6, Sword, "A big sword", Gun, "A big gun"

Where the first number is the ID of the room, then some room description, next four would be where each of the exits leads to. Then you could have a list of objects and descriptions.

You'd just create an array or room objects and then populate it with the different lines in the text file. E.g. room with ID one would go into index one. And if going west took you to room 6 you'd just look up the room object in room_array [6]

You could alternatively have a 2d array with each item being a room and the index of the item would be it's location. E.g. If your in (3,2) and go north you know you would then be in (3,1).
15 years ago
Just a couple of questions regarding MP3's and JAVA.

Is it possible to play MP3's using java?

Would it be possible to stream MP3's to a portable device such as a PDA or LAPTOP from a server somewhere using JAVA???

Anyhelp whatso ever would be really cool...

thanks in advance.
15 years ago
Just a couple of questions...


1) What would I need on my PDA to start to delelope/run java applications/ applets/ midlets on it.

2) Would I be able to use JAVA to use the WIFI capabilities of my PDA?

Thanks in advance.
15 years ago
How would I go about displaying a gif image file in a java application.

The problem is I need to display the image slowly line by line and not just straight onto the screen.
16 years ago
Basically I am working on a simple battle engine... this is just my first attempt at making any type of game and arn't really aiming to make a RPG just trying to see how much knowledge I have and make as good a battle system as I can.

All the enemies I have made using objects... such as bat, troll etc... and they have attributes such as hit points.. experience points left after dead... attack and defense power...

anyway to start my battle engine I pass two objects into it like this...

<B>battleEngine.startBattle (badBat, Ben);</B>

however my method that starts the battle stats like this...

<B>static void startBattle(Bat badBat, Player Ben)</B>

I can only accept a Bat object into it so if I wanted to fight a troll by using

<B>battleEngine.startBattle (Troll, Ben);</B>

if wouldnt work because the engine would be expecting a bat.. how do I go arround making it accept any enemy object... and using that as the person I am fighitng???
17 years ago
Is there a way to clear the screen and move the cursor back to the top of the screen???

What I want is after I have don't something in my program is to ruturn to the main menu. However at the moment when I return to the main menu it jsut appears at the bottom of the screen with all the previous text above it..

A way to clear the screen would be cool

Thanks...
17 years ago