xml parsing - object creation - error handling...design suggestions?

824 byte By manu212a at 2007-11-26 14:46:49
I'm new to OO programing so am seeking some design help. I need to write a process which will parse an xml file and generate POJOs. The problem is that the structure of the xml file changes quite a lot. Sometimes some attributes are there, sometimes not. I want to define rules for my POJO ...

Getting Images from a Directory & Displaying them in frame

184 byte By Mizraabia at 2007-11-26 14:48:51
I need to know tht how can i get Images from a Directory using JFIle Chooser & then displaying all the images in small size in the frame below plz help me out !THankx

Implementing the shortest path algorithm

984 byte By Shaya at 2007-11-26 14:49:23
Hi 兒 I need 2 implement the shortest path algorithm for my project. But donno what is the best way of implementing that. Now for the testing I created 10 objects and I connected them together. (Node A having the reference of node B. if they are connected).Then I wrote a recursion method to find ...

Bad cycles in Java

600 byte By Fonziea at 2007-11-26 14:55:48
Hi everybody,I gotta a problem to solve with a graph:1) I need to find every cycle in a graph.2) For every cycle I have to calculate a ratio beetween edges with a certain label and others so I need, everytime I find a cycle, to give it an ID or something that identifies it.3) Of course when I ...

Reloading of a singleton properties file syncronously.

3603 byte By ssv45324a at 2007-11-26 14:58:05
I have the following class file which is a singleton and also relads the properties file synchronously(reload() method).Can you pl. suggest if the following code is correct?public class PropertiesFile{protected static PropertiesFile instance = null;protected Properties m_props = null;private ...

read-only + writable DAOs (scaling, database replication)

736 byte By mhhdudua at 2007-11-26 14:59:40
Let's assume I have the following database configuration:-1 Master Database-2 Replicated Databases (from Master)Do I have two types of DAOs? One that's writable (accessing master) and one that's read-only for access to replicated DBs?E.g.WritableFooDAOReadOnlyFooDAO*** OR ***How about ...

Factory methods and downcasting

4046 byte By IngoSeidela at 2007-11-26 15:02:38
I am having a class hierarchy and a factory method that creates the classes from this hierarchy. The factory method returns the root class of this hierarchy and every time I want to use a class specific method of one of the sub classes I will have to check the type of this class and cast to ...

A Ring Partition Algorithm

70 byte By yaros3a at 2007-11-26 15:10:08
I'm looking for something about RPA and implementation ie. C++

finding a color with a robot

892 byte By nickmagusa at 2007-11-26 15:10:11
Hey i am making this program and i need an efficient findcolor algorithm i am currently using this:public Point FindColor(Color c,int x1,int y1,int x2,int y2,int tol){for (int i=y1;i<=y2;i++){for(int j=x1;j<=x2;j++){if (colorSimilarity(getPixelColor(j, i),c)*100>100-tol){return new ...

Genetic Algorithms

4993 byte By phalkonea at 2007-11-26 15:10:29
I have a problem I want to solve using genetic algorithms and would like some advice. It is kind of hard to explain what I actually want to do, but I have simplified the problem to make it more understandable (the principle is still the same).Simplified problem:I have 4 containers of different ...

problem about normal distribution

194 byte By seablue1023a at 2007-11-26 15:21:19
i want write a algorithm to implements the normal distribution formula. i worked hard but without success. does the jave liberary includes one? or please some write one for me. thank you!

DEAL OR NO DEAL HELP THIS IS URGENT PLEASE HELP ME!!!!!

24695 byte By _hero_a at 2007-11-26 15:24:30
i have a project due in two days and i must create a deal or no deal game in java the following is the code i have currently created i am not very advanced so this is where i am at so far:// The "DealorNoDeal" class.import java.awt.*;import hsa.Console;import java.util.Random;public class ...

Turret

314 byte By HelpMEa at 2007-11-26 15:24:34
I need to make a turret for a game. The turret will fire bullets and hit objects moving towards it. The turret's chamber can move within a 120 degree field. I've never done any animation and any help would be much appreciated. Key Bindings are left, right, up and down, and space to shoot. ...

Snood

911 byte By ErikSilkensena at 2007-11-26 15:32:45
I don't know if everyone has heard of this game.. I think it was really popular a couple years or so ago... but anyway, I would like to try to make a "Snood" clone in java.I'm not looking for code, but I did want to ask if anyone had any suggestions concerning what I would like to ...

I don't understand the choppage in here...

263 byte By cotton.ma at 2007-11-26 15:34:32
Did someone report abuse?I thought I had made some good replies to the job thread. I don't understand why that one was chopped yet puyo puyo continues to flower like a sunflower in manure. I mean is this some administrator's idea of a joke?

Game loop using Swing?

1102 byte By davedesa at 2007-11-26 15:40:33
Hey everyone. My simple game engine currently uses Swing for the frames and components, but uses an AWT Canvas for the actual game display. I'm trying to figure out how to change entirely to Swing components.Here's basically how I've laid out my game loop thread using Canvas:1. Do ...

JOGL - red- green- STEREO

369 byte By JimmyJacksona at 2007-11-26 15:42:55
Hello,I wrote a little application with jogl and now want to make it red-green-Stereo.Does someone know a good tutorial, how to do that?Or maybe can explain the main points to be considered?I did a red-gren-stereo app ones, but it's quite a long time ago, and I can't find any suitable ...

Need some help with a pattern..

580 byte By N3ila at 2007-11-26 15:49:51
Hope someone can answer this one simply for me :)If one object has a list of references to all of its child objects, and needs to know about changes to those child objects, which pattern would be best to use here?I had thought observer, but this is defined as:Define a one-to-many dependency ...

Change Highscore list from ASC to DSC. Urgent

4973 byte By Shadowlia at 2007-11-26 15:52:32
Hi guys. I need help with changing the sort type of this code.I write the output in an jTextArea Field with Descending order. it looks likeViktor = 40Thomas=65Emil=30Alfred=120so you see that the names are sorted. i want the points (score) to be sorted. The data is saved into an properties file ...

Spring/Hibernate Integration , slow response

145 byte By ManyaCanceriana at 2007-11-26 15:56:43
I m using HibernateDAOSupport provided in spring framework to access database.The response is very slow.Can anyone help me in this regard?

Design Pattern Names

642 byte By GhostRadioTwoa at 2007-11-26 15:59:04
Started fooling around with some industry-specific software implementations. In one software design document, I came across a reference to an old familiar term "design patterns". This part of the text was describing XML Schema Design Patterns. Below is the first paragraph, which made me laugh ...

Resizing Text Area Fields in Grid Layout

737 byte By TheLemminga at 2007-11-26 16:06:04
So. I have a game where little sprites randomly move down the screen, and at the bottom is a user-controlled tank. The tank fires with the up key, and moves left and right. Each shot fired that hits a sprites gives the user one point, every sprite that passes the tank subtracts 5 points. The ...

Good name (or maybe a pattern) for a client-side data accessor

1654 byte By jdupreza at 2007-11-26 16:06:24
Hello,I am building a client/server app, the client is a Swing application.The client needs to read/write information to the server. I have a set of "DAO" classes that encapsulate remote acces:package myapp.client;public class OrderDAO {public OrderDTO getDaylyOrders();public void ...

Poor frame rate

52561 byte By cstpgg123a at 2007-11-26 16:09:38
I am having trouble with a game i am writing - an isometric populous style game. I think my problem lies with the way I am implementing the graphics. Please see my main class and graphics class below:import java.awt.*;import java.util.*;import javax.swing.*;import java.awt.event.*;import ...

Jogl for Windows

846 byte By David_Mirandaa at 2007-11-26 16:09:56
Hello, I have a Jogl question...it appears that javagaming forums are down, so I thought that I'd try my luck here.I came across this text in the following wikipedia article: http://en.wikipedia.org/wiki/Comparison_of_Direct3D_and_OpenGL"Microsoft's OpenGL driver bundled with Windows versions ...

Circular Magnification - Sniper Scope

407 byte By ArikArikArika at 2007-11-26 16:10:09
I'm hoping to make a sniper-esque game. The background is far away and when the mouse (scope) is over a certain area, then that area is enlarged. A subimage method call would work well for that... But heres the catch, a sniper scope is ROUND not square. How can I capture the subimage and then ...

JAIN SIP PRESENCE PROXY PROBLEM

604 byte By dave85shuna at 2007-11-26 16:11:28
I was download the NIST JAIN-SIP-PRESENCE-PROXY project. i use the ant to run and compile the project is fine. but IM cannot sign in to the presence proxy i use two command prompt to open IM and presence proxy. i have change the domain as my computer name. but the IM also cannot sign in to the ...

Please recommend a website for game - graphics

412 byte By xixiaoa at 2007-11-26 16:13:42
hi,I am going to start coding a Action-game using J2ME, it's about the aircraft battle on space, so I need the game graphics as many sorts as possible, like: player's craft in 16-direction, enemy with 16-direction, backgroud picture, different tiles in different levels.But I am a newbie for ...

Humorous Pattern Image

100 byte By DrLaszloJamfa at 2007-11-26 16:15:05
http://home.earthlink.net/~huston2/images/GoF_full_medium.pngWell, I larfed, anyway...

The Great Problem Of Puyo

302 byte By adi_007a at 2007-11-26 16:16:19
HI all!!I am facing the same problem of Puyo and i want solution of the same. I am new this gaming aera and cant help myself.P help me.my email is adisuns@gmail.comPl help.Message was edited by: adi_007Message was edited by: ...

Help Needed with Computer Science Java Project!

769 byte By djsinlesa at 2007-11-26 16:16:50
Hi everyone, im in my final year at uni, im implementing a board game in java. I've started programming it, but have the main part yet to do, which is the actual game play. I need someone to look at my code and give me a few pointers, or even better do it for me, all this of course after you ...

Saving String

121 byte By the_egyptiangokua at 2007-11-26 16:17:20
hi guys im new to all this . I have a question if i want to say a string would i do it using a FileoutputStream();

Menu Scrolling with JScrollPane and the Keyboard

1108 byte By jamlub1a at 2007-11-26 16:22:22
Hello,I am a computer science student, and I'm currently writing a DDR(Dance Dance Revolution) clone, and I can't figure out how to make my menus scroll with the keyboard. The menu is composed of JLabels placed on a JPanel, which is set as the content pane when it is needed to be displayed. ...

Question on basic programming.

489 byte By MetalFanga at 2007-11-26 16:26:56
Hi everyone, im still new to programming, i got a very simple homework but i dont know where to start. The program that im needed to do is firstly ask the user to type any two words ( the program are not needed to check if the word exit ) secondly the program shud be able to tell if the 2 words ...

EJB Design Issue to avoid try catch block for RemoteException

938 byte By CSJakhariaa at 2007-11-26 16:27:11
Softwarejboss 4.0.5JDK 1.5_06ProblemI have a Stateful Session Class which till now was used as a normal Desktop Client but now I am trying to convert this class into Stateful Session class.So to convert that class into Statefull class in such a way that the same class can be used as a normal ...

SDP-Library <--> SIMPLE-Library?

502 byte By armaged_dona at 2007-11-26 16:28:04
Hello everyone,I'd like to implement the SDP-Protocol in combination with SIP in J2ME.My questions are: 1. Is it possible to combine the SIP-Stack with this SDP-Implemenatation http://jcp.org/en/jsr/detail?id=1412. Where is the library (source code) ?3. I'd like to create a chat based to ...

Trouble with Hex Map

1046 byte By DarkMortara at 2007-11-26 16:29:34
Tryin to draw my temp hex tiles, but i am having problems getting them to 'stick' horizontially, ive read tuts. but my problem is that i dont know how to find the length of each side on the hexagon, i need that for the other problems to work, but ive gone this far with just dividing the ...

XML or Java-Centric Web Services?

5481 byte By Saisha at 2007-11-26 16:34:43
All,Good to be back, and I thought I would start a thread on whether it is better to go the JSR 181 route (Java-centric using annotations and a POJO or EJB to generate web services) or the W3C WS route (XML-centric using schema and/or WSDL to generate a Java component model). In short, build ...

AStar Search Logic (Bug)

2331 byte By DMTNTJGDa at 2007-11-26 16:38:04
I have been working on a simple implementation of the A* Search Algorithm. I thought it was working, but apparently I didn't test it enough with different terrain movement costs (grass is easier to pass through than mountains, etc.). And now I'm wondering if my logic is even correct:loop ...

warning handling

8633 byte By kcraft4826a at 2007-11-26 16:51:37
OK, so everyone knows what exception handling is in java:try {throw new Exception("Error!");}catch (Exception ex) {System.out.println("An error occured: " + ex.getMessage());}...but what if I want to throw an exception that is not fatal--i.e. my program can continue with its normal operation, ...

Tricky regex question

434 byte By imranha at 2007-11-26 16:51:56
Hi,I need to split words from a sentence that are more than 2 letters. An example sentence is:This is "very" 'tricky'. I won't be able see it.I came up with the following regex, but it breaks the word won't and I only get the part that is before the single quote.[&]*\b[a-zA-Z]{2,}+\bMy ...

Performance Issues with Validation Framework

438 byte By irshad007a at 2007-11-26 16:52:49
I am planning to use Validation Framework in my project (non-struts based ) for the form validations. But I am not too sure about the performance issues I am gonna face bcoz of this. Since its a banking application so any response beyond half a second would not be bearable.Please share ur ideas ...

aco implemenataion for shortest paths.

150 byte By law1211a at 2007-11-26 16:54:06
has anyone used ant colony optimization algorithm for finding shortest paths other than for the tsp? please i need some help and advice. thanks

decoding binary decimal format

7628 byte By rkippena at 2007-11-26 17:02:25
Each row represents a number. The first row corresponds to a value of 1, the second row corresponds to a value of 2, etc.There is obviously a pattern, but sometimes the numbers seem very strange. I'm trying to decode how the numbers are being stored.00111111111 1 ...

Change delta processing

346 byte By _dnoyeBa at 2007-11-26 17:03:19
Are there any patterns out there to manage incremental change of a system. I have a drawing and I want to manage its changes. Rather than processing the whole thing from scratch every time, Id like to store the already processed stuff, and only introduce the delta for each subsequent ...

Finding the smallest missing number in a list

440 byte By dove17a at 2007-11-26 17:04:09
Can somebody tell an algorithm for finding the smallest missing number in the list.numList is a java list having numbers like789689000378968900027896890000Here the result should be 7896890001list is allways in decending order.The first 6 numbers of each number in the list are same which is ...

sorting list in acending order

58 byte By dove17a at 2007-11-26 17:05:11
Can anyone tell how to sort List in ascending order

Splash Screen timer. ( I know its a dumb Q)

764 byte By thyscorpiona at 2007-11-26 17:06:02
hi i am new to java and i am making a personal contact n bday reminder program for myself. i wanted to add a splash screen when i load the program.i tried Thread.sleep() i tried to use System.currentTimeMillis() with a while loop.. but the problem being my splash screen doesnt show on teh ...

A web service design issue with patterns

1201 byte By o9ipa at 2007-11-26 17:11:58
Hello,I抎 like to ask for your help in the following design issue:I need to create an email sending web service (with Axis). Only just one method which returns with an integer return code. This handles the following:-based on the given parameters gets the email addresses from an LDAP server ...

Insertion sort in doubly linked list HELP ME RHONDA!

1138 byte By javahockeya at 2007-11-26 17:12:53
This code causes my program to never stop running, I can't figure out why it will not sort the list.public void insertionSort(){Node pointer=head;while(pointer.next!=null){Node insert=pointer.next;if ...