In need of checkers board

132 byte By ChemComa at 2007-10-2 21:40:24
I need a checkers board code written in Java. With, two differnet collors. Can someone please supply me with the code pleasE?

Structure of the Java API (OO Design)

902 byte By Hayden_Meltona at 2007-10-2 21:40:54
Hi all,I am a PhD student at the University of Auckland, New Zealand. As part of my research I have performed an empirical study on a large corpus of Java software (which includes applications like Ant, Tomcat, Eclipse, Netbeans, Azureus). You can see how the structure (design) of the classes ...

Free UML IDE

701 byte By Servant@AKa at 2007-10-2 21:42:23
Hi all,I need to use a UML modeling tool for my java projects desin and implementation.for the time bein i use a good tool called umbrello ; but only on linux OS.I prefer to use an Eclipse UML plugin that has most capabilities as umbrello ; so I can use it on windows also.I tied some free ...

Encoding For XHTML

441 byte By njmitchella at 2007-10-2 21:44:42
Hi,I am currently taking content out of a database to be displayed on a page in an XHTML format. However, the content I am receiving is a mixture of encoded and unencoded eg I sometimes get & and other times I get & within strings. This will typically be in a url. I wondered if anyone ...

global variables in main()

328 byte By pete_c12a at 2007-10-2 21:45:53
is it bad oop practice to keep all your global constants in main() and have your other classes access them from there?also, would anyone happen to know of a good online resource that addresses proper oop practices and goes beyond explaining the foundation stuff like inheritence, encapsulation, ...

Psuedo Singleton, or other options?

949 byte By guitar_man_Fa at 2007-10-2 21:46:53
I am working on a project in which I am going to need to reuse a lot of the functionality of some existing singletons in the code base of my company's application.There are ligitimate reasons for these objects to be singletons (i.e. they store data that I only want stored once, etc). But, in ...

MVC First Attempt - Advice

1858 byte By abthma at 2007-10-2 21:47:08
I'm trying to use MVC for the first time, and I'm trying to follow the example given in http://java.sun.com/developer/onlineTraining/GUI/Swing2/shortcourse.htmlThe main part of my model (the equivalent of IntVectorModel) is capable of creating message generators. It keeps a list of which ...

avoiding using instanceof operator

4406 byte By nootcha at 2007-10-2 21:47:39
I've heard that using the instanceof operator isn't such a great code technique, and since I'm in the design phase, I feel like I should be able to avoid this. Right now, part of my design requires use of the instanceof operator as well as casting.Let's say you have a common notifier ...

Objects + Idea of Single Responsibility

2167 byte By ktm5124a at 2007-10-2 21:47:42
Two questions:1) Let's say you have an instant messenging server. (I am using the conditional because I have already made the server and am really curious about the client, yet this is the same problem with an easier example to explain.) The server has to validate the user's registration, ...

How to handle different versions of (credit) products?

1063 byte By Miklewa at 2007-10-2 21:50:22
I work for a bank where we sell various financial products. For example credit products. Let's say the name of a credit product is BicycleLoan with which you can buy bicycles. Buying a bicycle on loan can be done only if you fullfill the requirements of the Bank. If it is ok, you can get that ...

standard deviation

889 byte By Fabio_Aa at 2007-10-2 21:51:06
Hi,I have an application that calculates standard deviation of an image.the image is in RGB space and calculate standard deviation for each channel separately...this is the codefor (int i=0; i<256; i++){DeviationtempR+=Math.pow(((IstoRed[i]*i)-MediaR),2); ...

Question about Interface usage

2834 byte By _dnoyeBa at 2007-10-2 21:52:59
I have a class that implements two interfaces. ONe is a management interface and the other is a usage interface. Users should only know about the user interface. But I wanted to prevent the ability to cast to the management interface. Since the clas simplemented both there was no way to prevent ...

"View and then probably Edit " scenario

694 byte By diniakia at 2007-10-2 21:54:09
Hi,I have a JSP page which displays attributes of an object in view-only mode. The user might click 'Edit' or click cancel and move on to some other page.Currently I am storing the object id as hidden value in the view jsp and when the user clicks edit I make an explicit db call, retrieve the ...

how to insert values into an array of class

3920 byte By qwedwea at 2007-10-2 21:54:33
Hello everyone,I need help in inserting values into an array of class, which i have read from a file. Length of the array is 5. I should insert values one by one into that array.If the array is full (if count = 5), then I should split the array into 2 arrays and adjust the values to left and ...

Best order determination

316 byte By guy.bashana at 2007-10-2 21:56:25
Is there some good method for determining the best order of items (without checking all combinations of course). I am using Taguchi method for checking several factors against several levels. But I would like to check several factors in different orders (of course, with the least number of ...

Window Closing Technique

1102 byte By _dnoyeBa at 2007-10-2 21:57:22
I have two model classes. System and Component. And two views, SystemView and ComponentView. When the SystemView is closed the ComponentView needs to be closed. However, the ComponentView does not know anything about the SystemView. The only way I have found to connect the ComponentView with ...

Abstract Classes versus Interfaces

1604 byte By paultaylora at 2007-10-2 21:57:59
Somebody at work has just made an interesting observation and its bugging me, comments please.When I started Java I just used classes (and abstract classes), and didnt bother with Interfaces I understood them to be a way of getting round the lack of MultipleInheritance and it wasnt a problem ...

Fill Shape

1574 byte By sosleepya at 2007-10-2 22:00:44
need help writeing method fillShape that takes in a 2D array of shapes and points(in other words it will draw the shape and fill it in into my Screen array(ex: Color[][] String = new Color[700][1000]) basicly a 2D array of colors which are painted in my paint method... anyways im sent this 2D ...

Algorithm for check JPEG format

171 byte By OcELLa at 2007-10-2 22:01:18
Hi! I need to check if a JPEG file is ok. I can't use any multimedia library. Anybody knows how can determine if a file is a JPEG file, and it's ok.Cheers!

network game- what will be used to send & receive data?

368 byte By cjrena at 2007-10-2 22:02:58
hey guys, i have some questions needing yours helps.when i read the Thinking in Java and tutorial, they use PrintWriter and BufferedReader for networking using socket, but you must know that some ones suggested use the DataInputStream and DataOutputStream instead. Any diffenents? I'm a newB, ...

DAO +understanding/explanation

250 byte By Aknibbsa at 2007-10-2 22:04:48
I am trying to learn more about creating enterprise applications and I am looking for a easy to understand explanation of using DAO's as well as how to create them within a JSP/struts application. Any suggestions would be greatly appreciated.

Map Boundary Recognation

545 byte By rajanaga at 2007-10-2 22:09:26
Hi, We www.tejasoft.com is focused on j2me development and has worked with international clients like www.dotphoto.com in developing high value and most reliable midlets. We are now developing a product which needs an algorithm which could recognize the boundary of gif image. gif image boundary ...

Multiple regression

381 byte By ANDYAa at 2007-10-2 22:10:30
Does anyone have source code for a class able to compute multiple linear regression. I've been using the jama for matrix operations.A previous post was very similar to this, but I was unable to find anything in the linked answers that I could incorporate into what will be a high volume ...

Which book?

847 byte By Jimmkirka at 2007-10-2 22:10:33
I'm currently reading Core J2EE Patterns to try and improve my design skills. It's my first real introduction to patterns, and the first 150 or so pages were an okay read. When it gets into the pattern section there are a lot of references to other patterns, not covered in the book, which are ...

flickering image

632 byte By sosleepya at 2007-10-2 22:12:57
when using an applet to display my game i have the paint() method first draw the backround and then all of the other objects the belong on the screen. when the game moves a little faster the objects flicker over the backround. is this normal?if its not normal... then can somone please test this ...

Football Match Computation (like manager games)

832 byte By Losgardila at 2007-10-2 22:14:27
Hey,This is my first message, so hello to everyone.I'm thinking of a way to compute a football match.I got some questions, I need your ideas:-I decided to do it with AI. All player's will have AIs, and I will put them on the pitch and set them FREE!. Then wait for the score and statistic ...

How do I make a "Character Select" system?

613 byte By KuroKyosukea at 2007-10-2 22:24:27
I'm making a game for school that is a vertical scrolling shooter (like the Raiden series), based off of the anime Galaxy Angel. For anyone who has seen GA would know there's 5 main characters, all of which I have put in my game. My program is an application (so swing answers only please), ...

Game Scripting?

4637 byte By davedesa at 2007-10-2 22:30:39
Hey everyone.I'm looking for suggestions on the best way to build a scripting language specific to a simple game I plan on creating. The scripting language would be primarily meant for game "modders" who wish to build on my game in a nice and easy way, without needing to know anything about ...

Primality algorithms in java.math.BigInteger

762 byte By the--duda at 2007-10-2 22:33:14
While working on implementing a primality test based on Fermat's Little Theorem, I naturally came across java.math.BigInteger to mainly utilize it's method for Modular Arithmetic.I also noticed that it has two other methods; isProbablePrime and ProbablePrime.As such, I was wondering which ...

Technology change. Which one?

1759 byte By Miklewa at 2007-10-2 22:33:26
Hello,I work for a bank as a java programmer. We have products like loans and systems that help the office clerks to sell that loans. Now we use self made RMI client-"server" architecture. The client is a Swing GUI connecting to the RMI server object. We are planning to have more kind of ...

keyPressed isn't moving my images...

682 byte By KuroKyosukea at 2007-10-2 22:36:19
I'm in desperate need of an answer since this game is due the next day...Simply put, when I hit a key, my images don't move.I tested to see if the problem was with the keyListener itself, but it was working fine. I tried putting the movement code directly into the keyPressed method, but it ...

Hibernate joining two tables

2000 byte By dv8dana at 2007-10-2 22:39:05
I am very new to hibernate and this question might seem a little elementary, but here it goes:I have a classpublic List<PurchaseOrder> getPurchaseOrders with a method that creates the query in question:public Object doInHibernate(Session session)throws HibernateException, SQLException ...

In search of Pattern

1765 byte By _dnoyeBa at 2007-10-2 22:42:12
I have a situation here and I havent been able to conceptualize a good solution.BackgroundI have an object that processes changes in things that contribute to changes. And then I have this system of objects.ArchitectureSystemComponentComponentInstanceThe architecture does not really change, its ...

Parsing/evaluating conditional statements

747 byte By paulnadlera at 2007-10-2 22:44:41
I need some help developing an algorithm for parsing and evaluating conditional statements. I need to be able to handle variables, logical operators, relational operators, mathematical operators, and parentheses.For example:if ( (a+1 > b*5) and ((c +2) * 6 <= 5) )All the variables ...

Poker Game

317 byte By ox_ten_wingsa at 2007-10-2 22:44:50
This is the rule of the game :The player is dealt two cards, the 'hole'. Five 'community' cards are then dealt. The player hand is then the best possible five card hand that can be made with the two hole cards and the five community cards. Is anyone here have the scripts ?please help ...

Best Place to check permission

163 byte By chamalsla at 2007-10-2 22:46:34
Hi,What is the best place to check security constraints. Is it the front controller of web app or a session facade.Thanking You,Chamal.

Parameter, Argument-difference?

114 byte By idomeena at 2007-10-2 22:46:50
could someone please explain in detail the difference between a parameter and an argument.Thank you.

PLEASE HELPP!!!!!

6673 byte By Ruffstara at 2007-10-2 22:46:58
Alright i got java from a friend and was playing around with it and now im trying to design a game, i thought it would be simple but now i am lost, i am trying to make a memory matching type game but when i flip the cards i dont know how to remove it or flip it back over, if anyone can help ...

Help with singleton!!!

623 byte By Galadriela at 2007-10-2 22:48:41
Hi,I did read the singleton topic. But it stays confuse to me.How to garantee that only one instance of Class per VM ?I am building a component to stay running forever doing some tasks... From command line this can be started and stopped..I am trying to implement a class, a singleton. Some ...

Return type vs throwing Exception

1994 byte By nootcha at 2007-10-2 22:52:20
As it turns out, a quick search in google reveals that the issue of return type vs. exception is somewhat hotly contested, but I thought I'd check to see what people here thought, based on a particular example that I'm dealing with.In an interface I've developed, I have the method:public ...

Just Finished Simple Arcade Game - Need Feedback

708 byte By DMTNTJGDa at 2007-10-2 22:54:57
I am currently a Sophmore in high school, and I just finished creating a simple arcade game in my spare time (for fun). It is located at http://students.hightechhigh.org/~dturnbull/10thGradeDP/Java/IGMESMAG/index.php. Any suggestions or criticisms, however harsh, would be greatly appriciated. ...

Design decision about using a Collection's view

1832 byte By voytechsa at 2007-10-2 23:00:16
I hope this is the right forum to ask this question since it deals with a design decision.I'm writting an implementation for a new type of file format called "NAP" (Network cAPture) which stores captured network packets in a file. Similar to PCAP and SNOOP file formats.I'm designing the ...

Compare 2 arrays

381 byte By aneez_backera at 2007-10-2 23:02:10
I have 2 vectors containing String objectsI need to determine whether each String present in the first Vector is present in the 2nd Vector or notIs there anyways to to this such that its complexity is less than O(n^2) i.e Order(n square)The result obtained should be fast as this is algorithm is ...

Soundex

318 byte By rhajikhani1a at 2007-10-2 23:05:57
Hey Folks,I am trying to find a better implementation of Soundex algorithm than the org.apache.commons.codec.language.RefinedSoundex or org.apache.commons.codec.language.DoubleMetaphone. Has anyone any idea whether there are other implementations available? We are getting lots of false ...

designing plugin architecture

1750 byte By dev@javaa at 2007-10-2 23:09:25
hi everybodyI guess this is not a java-specific question, but this is the best forum I know ;-)recently I posted a topic asking for nice plugin frameworks to include into my projects, and I decided to go with JPF... also because I haven't found any other option =Pshortly I'll begin a ...

Error handling in MVC

565 byte By andy786a at 2007-10-2 23:09:52
What are the recommended approaches for dealing with errors that arise in the Model (observable/subject/publisher) piece of an MVC architecture? For example, if an error occurs in the Model during a database update that resulted from a database access initiated from View to Controller to Model, ...

Business Delegate and Session Facade

562 byte By Supes73a at 2007-10-2 23:11:06
In the J2EE patterns catalog it is stated that there is typically a one to one mapping between a Business Delegate and a Session Facade. I have been, for sometime, been under the impression that the Business Delegate can be a singleton. Does it make sense to have a singleton Business Delegate ...

Binary Tree

341 byte By LOLOa at 2007-10-2 23:12:37
Hello all,I'm trying to make a code that search inside some files.. I did it in sequential way but it's very slow and not effeicient..I want to do it using binary search tree.. how can I sort files (or strings) and then search within these strings..with all my respect..Message was edited by: ...

DAO J2ee design pattern

336 byte By Dollstartera at 2007-10-2 23:18:59
Hi,I understood the structure of DAO pattern like : The business Object uses Data AccessObject which encapsulates the DataSource. The DAO creates/uses the Transfer Object and the BusinessObject obtains/modifies the Transfer Object. Can i get the sample code for this pattern and any links for ...

Quick sort related questions

1299 byte By at 2007-10-2 23:19:36
I have three quicksort related questions that are all related to each other more or less so I am grouping them here.1) Why does Collections.sort have to call toArray() ? This is just whining i suppose but I don't want my List implementation turned into an array because it defeats the purpose ...