Visitor implementation and enum 1.5

7928 byte By alexsmaila at 2007-11-27 11:52:32
I have an application with enum, that's behaviour changes based on the value of the enumerated type, see http://java.sun.com/developer/JDCTechTips/2005/tt0208.html#2 for more detail. The problem that I see in this Design Pattern that client of the enum should decide what VisitorImpl should be ...

Annotations Observed

2643 byte By transient_mana at 2007-11-27 11:44:59
Hi all,I have a situation where I feel the need of combining Annotations and the Observer pattern. I would like to record field changes on an Object. So I decided to use the Observer pattern this way:class PersonObserver implements Observer{private List<String> changedFields = new ...

recursive Algorithom to loop thru all the values in a list

477 byte By MeherSantosha at 2007-11-27 11:43:14
Hi Guys, Please help me out.I have a list sayL with N Array lists in that .and i need to loop thru all the values in that to print all combinations.L = { L1,L2,L3....N}L1={ 1,2,3,4,5}L2={aa,bb,cc,dd,ee}L3={10,20,30}I need to loop thru all the values and print all like a odometer.like1,aa,101,aa,20 ...

Hi

229 byte By JustMe21a at 2007-11-27 11:40:21
<p>I'm kinda new in all this.</p><p>could someone give me search tips on how to find a good tutorial on how to build games(not applets), mainly about animation and graphics. Or just point me to a good tutorial. thanks ahead.</p>

Rock Paper Scissors Game

598 byte By Dave_Carta at 2007-11-27 11:31:00
Hey!Sorry if this is posted in the wrong place, but I'm excited because I made my first game in Java. It's a rock paper scissors game and it's online atwww.geocities.com/glopv2The reason I made it is because I wanted to make a computer RPS machine that would detect patterns in your playing ...

Multimedia program

363 byte By bem045000a at 2007-11-27 11:21:42
Im stressing and havent had time to do my final project for this class can someone help.. thanksDesign a Java art program that will give an artist a great variety of capabilities to draw, use images and use animations to create a dynamic multimedia art displayif you can help that would be ...

Design Patterns In Java

156 byte By yael800a at 2007-11-27 11:20:40
<p>Hi,</p><p>I would like to know if this book is good:</p><p>"Design Patterns In Java" - Steven John Metsker William C. Wake.</p><p>Thank's</p><p>Yael</p>

Strategy Pattern?

8055 byte By AQ_Javaa at 2007-11-27 11:20:00
The question:Design a small, prototype, application, which creates, stores and amends warehouse records. This may have little more than a StockItem class.Using each of the patterns Strategy, Decorator, Adaptor and in turn provide three different adaptations to your prototype application which will ...

Unicode-16 for mySQL image storage

478 byte By ArikArikArika at 2007-11-27 11:18:53
YEY!!!BOO!!!Well, I'm storing an image as a blob in a mysql database... great!I can read out the bytes too... great!What I'd like some help with is how to write to a file in unicode-16 format.I'm trying to use OutputStreamWriter... But I dont know what I'm actually doing. I checked out the ...

Domain Objects and Interfaces

1278 byte By SmellyCata at 2007-11-27 11:16:16
I have a question regarding using interfaces, in particular for domain objects, and visbility regarding bidirectional associations.Let me explain the problem I am having using this exampleinterface INode {INode getParent;void addNode(INode node);}class Node implements INode {private INode ...

JOGL Textures

600 byte By tbeernota at 2007-11-27 11:13:33
Does anyone have a simple example / explanation of drawing a texture using JOGL? I'm getting confused about what I find on the internet. There are examples that use com.sun.opengl.util.texture.Texture and bind, enable en disable it upon rendering (but this doesn't draw anything in my tests, but ...

Sound handling in (game) application

828 byte By gwegrwergwra at 2007-11-27 11:13:31
As my previous question did not receive any answers, I'll try to rephrase it.I need to change the volume of sounds during the game (changing pitch would be nice too). I tried to use:double currentVolume, volumeGain=.01, newVolume;FloatControl gainControl = ...

DTO doubt....

511 byte By jvmana at 2007-11-27 11:01:10
Hi all,I am having some doubt in Transfer Object pattern.. How should we implement that pattern exactly? Lets take an example of displaying data from customer table. In my customerDAO iam creating an arraylist (containing records retrieved) and sending back to the presentation tier through ...

DND Design

117 byte By mammaa at 2007-11-27 10:55:33
<p>I want to develop a drag and drop based IDE.</p><p>How should I proceed ? Should I go for an example to follow</p>

limitations of Factory Pattern

73 byte By NoNewNamea at 2007-11-27 10:46:59
<p>Hi,</p><p>Can any of u tell me the limitations of factory pattern.</p>

Synchronization of client and server objects

414 byte By Vladica_Ognjanovica at 2007-11-27 10:41:49
I have architectural question. At server side we have .Net web service, at client side we have java desktop application.Issue is that we have an object (large object), let say ObjectA, on client side and its copy on server side. We get ObjectA by calling web service.Now we need these two object ...

Web Service Implementation Heavily Based on The Singleton Pattern

1595 byte By mangofirea at 2007-11-27 10:38:35
Dear allI have recently joined a project that is 2/3 through development of a medium sized application providing synchronous and asynchronous implementations for a number of Use Cases exposed as Web Services. The design is one that I have not come across before and am keen to understand.Web Service ...

What Java IDE do you Use?

59 byte By Wraithstridera at 2007-11-27 10:31:41
<p>For me, The Eclipse IDE is the best IDE out there...</p>

Should a method have only one return point/statement?

2219 byte By MartinBoehma at 2007-11-27 10:23:30
Hi,sometimes I have Code that looks like public boolean equals(final Object o) {if (o == null) {return false;}if (o == this) {return true;}if (!getClass().equals(o.getClass())) {return false;}if (this.getId() == 0) {return false;}final Link cObject = (Link) o;if (this.id != cObject.id) {return ...

Generating feedback messages on server-side vs client-side?

3679 byte By jdupreza at 2007-11-27 10:22:33
Hello,I am maintening a client/server app (Swing client, no Web pages), basically an order processing system. The biggest part of it is to verify the conformity of orders to a set of business rules.As usual, some of the verification can be made early on the client-side, but most of the verification ...

how to make a standalone proj as network proj

303 byte By brainvinod@yahoo.co.ina at 2007-11-27 10:21:35
Hi friends i have done a school management software it collects overall details of the students,exam,marks,report. i have done in java swings.now i need to convert this stand alone proj into nertworking ie windows based. Which concept i need to use how can i do this.by ...

MVC with Struts?

227 byte By vatora at 2007-11-27 10:18:19
<p>If you are going to implement the MVC pattern in a webapp, what is the best framework to use? </p><p>I've done a tutorial with Struts. Is that a good framework?</p><p>Is there any disadvantages by using such frameworks?</p>

MATLAB

304 byte By javoxygena at 2007-11-27 10:09:59
Hello everybody!!I would like to ask if anyone knows about MATLAB. Does anyone? I am trying to build a programme for the flow-shop sequence problem, and I though as the problem is almost maths, the MATLAB could help me. If the question is yes, is it easy to use MATLAB? ...

Difference between Java & J2EE patterns ?

105 byte By Shebua at 2007-11-27 9:59:17
Hi...Can any one explain me what is the differnce between Java patterns and J2EE patterns ?

Multiple Mouse Listeners. Need help!

3125 byte By PaRlOaGna at 2007-11-27 9:58:54
Hey again people, i hope my questions aren't to tiring, and thank you originalsup3rman for answering my last question. I didn't want to revive the thread for fear of annoying some random person.On to the question.I was just wondering the best way to go about having a MouseListener and a ...

Design Database Connection Failure

473 byte By _AM__a at 2007-11-27 9:55:47
Hi, I was asked this in an interview.. 1) how would you a design a app. when database connection is lot. 2) will you have a database replica in another machine, so that if the connection is lost, take the data from the secondary database. I am not sure about this. But I strongly feel we never ...

Algorithm for Text file comparision

218 byte By myDreamEffortsa at 2007-11-27 9:48:45
Hi Everyone,Please help me how to develop a utility for comparining two text files and display the output in the browser as givenAddedModifiedRemovedThanks

Code to calculate ranks for a class

223 byte By JAVA-BIZa at 2007-11-27 9:43:02
Can any body have code to calculate ranks for a class of students whose marks are stored in a database. Finally after rank calculation we have to insert those ranks as per their login IDs..Please help me......

Programming Statistics

1104 byte By yahwehagapea at 2007-11-27 9:42:59
I need to find data on the distribution of cut blades of grass across the virtual lawn. Consider a 10 x 10 grid of un-cut blades of grass. The lawn mower traverses the grid and displaces the blades of grass. Now, I need to find some way to determine a good lawn mower route from a poor lawn ...

Space Game In Java

616 byte By CarelDuToita at 2007-11-27 9:38:43
Hi Java Game DevelopersMe and a friend from work developed a game in Java. Its at www.spacemercenaries.comIf you want to play click on play sm, this will load the client applet. It will also ask you to confirm a certificate, this is because the applet uses sockets to connect to the server and ...

xml format & connect refused

1598 byte By 14dr_19a at 2007-11-27 9:36:46
HelloI am new to rss feedsI have deployed the project TestRome and feedservlet is giving output in xml formatFor eg:<?xml version="1.0" encoding="UTF-8" ?>*-* < http://localhost:8090/TestRome/feed##> <rss xmlns:content="* http://purl.org/rss/1.0/modules/content/*" ...

Pricing a game?

300 byte By OriginalSup3rmana at 2007-11-27 9:36:06
I have recently been asked to develop a game for a company.It is a simple game, nothing special but I was wondering ifanyone who has independently sold a game (or anything you programmed) had ideas on how to price it.Any ideas would be ...

Tile based game

59 byte By biojaea at 2007-11-27 9:35:14
How would you implement a side scroller with tiles ?

Role Pattern

421 byte By mandartanksalea at 2007-11-27 9:31:36
Hi, I want to implement Role-Module wise security for the User. e.g. Admin can do everything in the site.High Profile users can Insert/Update/View all the modules.Medium Profile users can Insert/Update/View limited modules.Visitors can only view static pages. I hear about Role pattern but no ...

Singleton Webservice

532 byte By CvDiemena at 2007-11-27 9:25:27
Dear all,I'm trying to create a singleton webservice. (a webservice of which only 1 instance is allowed. All calls to the webservice should 'end' in this singleton)Reason for this; the application uses a multithreaded back-end controlled by a ThreadPoolExecutor. This only has effect when ...

Problem understanding Factory Method Pattern

851 byte By minkeya at 2007-11-27 9:20:56
Hi All,I am trying to understand Factory Method pattern from HF- Design pattern. However i am unable to understand how Subclassing the PizzaStore is better than creating the invidiual region specific PizzaFactories.The author gives an example of SimpleFactory and then creates region specific ...

reverse observer pattern

467 byte By AlienXa at 2007-11-27 9:16:02
hi,is it possible to use the reverse of observer patterni.e - observer pattern is described normally as there is 1 subject & many observers.So when the subject changes, it notifies the observers. My problem is I only 1 observer but many things change, so when each of the things (subjects ) ...

Hard code the values of DB.

238 byte By PaviEluri20a at 2007-11-27 9:10:24
Before I start work on a DB- I thought to execute code with JSP- Formbean- Action Servlet- Business Class- DAO flow. Is it possible to hardcode values and retrieve it from DAO? Pardon me if this sounds dumb question. Thanks,

Design ideas for retrieving Data for Read Only

642 byte By durgakbea at 2007-11-27 9:09:21
Hi All, Currently I am in the process of evaluating different design ideas for the search functionality of my application. I am looking for a best option for retrieving the data by executing some complex sql queries with huge query criteria and showing the single or multiple records to the ...

DAO

594 byte By TechGSisa at 2007-11-27 9:09:16
Hi friends.I want use DAO for create a Swing application, that acess to PostgreSQL.I want to retrieve a list of objects ( for example: clients), How is the best implementation?Client[] clients = ClientDAO.getClients();or javax.sql.RowSet clients = ClientDAO.getClients();I'll use result ...

DAO design pattern

291 byte By PaviEluri20a at 2007-11-27 9:02:00
I have 2 DB's (sybase & oracle). I need to pull information from both of them and put it in another DB- table (may be oracle). I am planning to implement DAO and here is my problem:-1. ShouldI use 2 DAO's for two DB- tables? or just one is sufficient using a DAO factory?

DAO design pattern

291 byte By PaviEluri20a at 2007-11-27 9:01:59
I have 2 DB's (sybase & oracle). I need to pull information from both of them and put it in another DB- table (may be oracle). I am planning to implement DAO and here is my problem:-1. ShouldI use 2 DAO's for two DB- tables? or just one is sufficient using a DAO factory?

Need help with tree edit distance and restricted top-down mapping algorithm

1142 byte By style.x7a at 2007-11-27 9:01:33
*This topic was posted a while ago in "java programming" section but was suggested to try hereHi everyone,A couple of days ago I posted a topic on analyzing structure similarity between two web pages. After some researching, I know I need to work out some tree matching algorithms: tree edit ...

Superset Limitation

4770 byte By Pollaa at 2007-11-27 9:00:07
I wrote this script for finding superset of a set but it has limitations in the number of elements it can find for 19 elements after this it crashes memory heap limitation any other way to solve this problem is there any standard (or known) algorithms that resolves this problem NOTE: in TOPIC ...

genetic algorithm-crossover/reproduction

3480 byte By brisJavaa at 2007-11-27 8:53:41
Random r=new Random(); int pointNode1=r.nextInt(component1.size()); int pointNode2=r.nextInt(component2.size()); if(action=="Reprod"){//do Reproduction or Crossover System.out.println("--"); System.out.println("pointNode1:"+pointNode1); System.out.println("pointNode2:"+pointNode2); ...

simple question; cross referencing classes

399 byte By Bhishmaa at 2007-11-27 8:53:29
Hello, I have 2 classes. Address & User. The relationship is Address belongs to User (& is a 1-1 in my case). As such I have an Address reference in my User class.Class User { Address addr; ...}Under what circumstances should I also include a reference to User within Address ?Class ...

Steady Framerate: Timer vs. Thread

724 byte By PaRlOaGna at 2007-11-27 8:48:45
Hey all! Alright, well i belive that the title of this describes what i'm basically looking for. Anyway, i'm writing a simple skateboarding game, and i need a steady framerate. I've tried multiple ways of keeping a steady framerate... all of which failed (obviously) which is why i'm here! ...

Please, 2D toolkit is needed!

440 byte By throwablea at 2007-11-27 8:46:19
Hi,Can You advice me any 2D toolkit that will help me to create board and card games? The desireable features are:- On top of Java2D (OpenGL is less desireable)- Support for structures like sprites, layers, scenes- Operates with 2D geometry- Fast enoughI found Piccolo toolkit ...

Proxy Pattern

650 byte By dfvdfvdfvxfva at 2007-11-27 8:43:22
Hi all,I've been reading about the Proxy Pattern and it seems like just normal encapsulation to me or do I misunderstand it?To me, Proxy looks like using a "middleman" class to delegate requests to the actual class so that the implementation of the actual class is hidden from the user.Another ...

PONG that s HARD (hard to believe eh?)

739 byte By ArikArikArika at 2007-11-27 8:40:21
WOW.Well, its not REALLY pong thus it is hard... So, take the classic pong game but change the shape of the paddle to lets say any polygon... When a ball hits any side of this polygon it should bounce off with the same angle as the incident angle but in the opposite dierection... Ok... So, how ...