7,116 Posted Topics

Member Avatar for solomon_13000

That looks right to me. I agree the CreditCheckFactory methods could be static - there's no need to instantiate a CreditCheckFactory. (ps: Without some way to make isAgencyUp() false you can't fully test your code. And there's no obvious reason why isAgencyUp() should be public.)

Member Avatar for JamesCherrill
0
286
Member Avatar for Nagarajan M

> InvalidAlgorithmParameterException: Wrong IV length: must be 16 bytes long That seems perfecrtly clear! (The rest of the stack is useless here because the line numbers don't match the code you posted) What happens when you use an IV that is exactly 16 bytes long?

Member Avatar for JamesCherrill
0
2K
Member Avatar for game06

We are just as confused as you are! Questions: * Why does the right key move the camera left? ("... if user keep right key down. than camera should move left ...") * Why would moving the camera make the player fall down? ("... camera should move left.and my player …

Member Avatar for JamesCherrill
0
192
Member Avatar for PreethiGowri
Member Avatar for DevilDog22

Define a Card class with instance variables for rank and suit. Create an ArrayList containing all 52 possible Cards to represent a deck. Take Cards at random from the deck to deal hands. Search the DaniWeb archives - there's lots of discussion about modelling card games

Member Avatar for <M/>
0
180
Member Avatar for riahc3

[This](http://www.javamex.com/tutorials/cryptography/symmetric.shtml) looks easy

Member Avatar for JamesCherrill
0
719
Member Avatar for PreethiGowri

Just a guess, but... you seem to be sending all the data as a single packet, so maybe you are creating a UDP packet that's too big for something in your network?

Member Avatar for PreethiGowri
0
327
Member Avatar for game06

Maybe this is revealing that the map[][] approach isn't a good one? If you defined ground as ab object like the movable ones, this would be easy?

Member Avatar for JamesCherrill
0
354
Member Avatar for mferarri

> In the first case, if you want to change the title of the jframe sometime later in your code ,you CANT change it . You have to create a new object inorder to change the title which is not what you need. @harinath: Do you have any reference material …

Member Avatar for mferarri
0
330
Member Avatar for farazpt007

DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules Post what you have done so far and someone will help you from there.

Member Avatar for JamesCherrill
-2
46
Member Avatar for jmartzr1

If one of your calls to isPerfect returns true then your allPerfect will execute the return on line 12, and that's OK. But if they all return false then allPerfect will drop out of the loop at line 13 and hit the end of the method without having executed a …

Member Avatar for JamesCherrill
0
540
Member Avatar for jrosh

Is this to convert bewteen any two currencies (eg GBP <> EUR, EUR <> USD, USF <> GBP etc), or just between different currencies and one "base" currency (eg EUR <> USD, GBP <> USD, YEN <> USD etc)? I ask because you talk of a currency as the key, …

Member Avatar for JamesCherrill
0
164
Member Avatar for game06

I agree with ~s.o.s~ The coding conventions he linked to are not mandatory, but they are the ones used most widely, particularly in all the Java API code. All working Java developers will be familiar with them, so if you want your code to be quickly and easily readable for …

Member Avatar for jwenting
0
213
Member Avatar for Fuzzies

You've run into a very common problem with Scanner. After nextInt() the following new line character is left unread, so when you do the next nextLine() you get a zero-length string ie "" It's a messy bit of design in Scanner, not your fault really. When yu have a nextInt() …

Member Avatar for bguild
0
565
Member Avatar for l.worboyz

Don't worry, this one often catches beginners out! You declare the method as returning a boolean, so the compiler checks your code to ensure that, no matter what happens in the if tests, you always return a boolean. In your code, if all three if tests are false, you will …

Member Avatar for JamesCherrill
0
154
Member Avatar for venus87
Member Avatar for game06

Here's the usual way to do it: in the bullet class have an update method (where you do x+=dx; etc)and a paint method. Maintain a list of all the current active bullets, and make that list available to the main class. In the main timer method call each bullets update …

Member Avatar for JamesCherrill
0
1K
Member Avatar for SHINICHI

`case 4: System.exit(pin);` System.exit() immediately terminates your whole program, so it's a bad idea to call it when you just want to exit the current loop. You haven't indented your code, so I'm not going to waste time trying to understand how your loops are nested, but I would start …

Member Avatar for untio
0
907
Member Avatar for vishalonne
Member Avatar for game06

The panel that needs to be repainted is display_class, so when you change any values in the simulation you need to call `display_class.repaint();` to see the result. ps I find your variable names quite bizarre - I hope they're not the result os some misunderstanding? Eg you have an instance …

Member Avatar for game06
0
327
Member Avatar for lauraroxi

Your model may consist of many classes working together - most models do. Similarly the view will almost certainly need quite a few classes

Member Avatar for lauraroxi
0
128
Member Avatar for Sacrificer_911

1. Make them buttons (or JLabels) in a JPanel and move them as required (use a null layout manager, set the button attributes to hide the usual borders etc) 2. Just draw them on a JPanel and have code that checks the mouse click coordinates against the position/size/boundaries of each …

Member Avatar for JamesCherrill
0
136
Member Avatar for elhkei

DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules Post what you have done so far and someone will help you from there.

Member Avatar for elhkei
-1
176
Member Avatar for game06

That message doesn't seem to match the code - can you please copy/post the exact complete error message(s)?

Member Avatar for game06
0
259
Member Avatar for hashim5003

Do you mean a number without leading zeros, or without any zeros in it anywhere?

Member Avatar for hashim5003
0
7K
Member Avatar for paku_dnj

on or This looks difficult! I looked at the source code for readPassword and it uses a native method to turn off echoing, plus the Console class is *final*, ie you can't extend it. I'd move on to something else if I were you.

Member Avatar for ~s.o.s~
1
10K
Member Avatar for jspence29

[Ljava.lang.Double;@35960f05 is what you get when you call toString() on an array of Doubles (which is what println does when you print anything - it calls toString() to get a printable version). That toString method is inherited from Object. There's a method in the Arrays class that converts arrays to …

Member Avatar for jspence29
0
400
Member Avatar for game06

To fix the problem at its source convert the image file to a format that supports transparency, eg GIF and use an image editor to select end delete the background .

Member Avatar for mKorbel
0
2K
Member Avatar for mydreamgirl
Member Avatar for JamesCherrill
0
344
Member Avatar for rancosster

Your target panel now seems to add the dragged item to the panel, regardless of where it was dragged from. So for an "internal" drag it will get added again. In the earlier version of the code you seemed to using a list of added items in an attempt to …

Member Avatar for rancosster
0
461
Member Avatar for SHINICHI

A class diagram does not document a process; it's a static view of the class structure of a module or application. Processes like yours are documented in Use Case diagrams. The very shortest "how to" goes like this: Look through your process description. Underline the important nouns - these are …

Member Avatar for JamesCherrill
0
269
Member Avatar for asifalizaman
Member Avatar for stultuske
2
252
Member Avatar for toldav

You have made everything in LinearEquation static. That's wrong. You create instances of LinearEquation, and each instance should have its own instance variables and instance methods. Simply deleting every use of the worde "static" from that class will fix it, but in the meantime you should revise your course materials …

Member Avatar for radhakrishna.p
0
369
Member Avatar for solomon_13000

" I get an exception" We're not going to guess what that could be. Exactly what exception at which line? - copy/paste complete message

Member Avatar for solomon_13000
0
239
Member Avatar for ellosbibu

Looking at the two programs the differences in style and coding technique seem to point to two different authors... Elena (the O.P.) seems to have written the text editor using full NetBeams code generation, but the color/font edtor seems to have been lifted from mazmar.

Member Avatar for JamesCherrill
0
189
Member Avatar for gkaran487

It woule be easier to use String's `split` method to split each line at the blanks into an array of words, then the last element in the array is the word you want. http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String%29

Member Avatar for JamesCherrill
0
179
Member Avatar for jemartalaban_1

You are taking on a very steep learning curve, but... Oracle have a GUI builder/IDE called NetBeans that goes with Java. [Here's](http://docs.oracle.com/javase/tutorial/uiswing/learn/index.html) a very simple tutorial that will give you a feel for how it looks, at least on a simple example. Learning object-oriented programming is a whole other thing...

Member Avatar for jwenting
0
276
Member Avatar for happygeek

It seems Oracle have rushed out a quick fix (or maybe just a sticking plaster?) for this one... http://www.oracle.com/technetwork/topics/security/alert-cve-2013-1493-1915081.html

Member Avatar for jwenting
3
1K
Member Avatar for paku_dnj

Your code repeats because you have a recursive call on lines 23/24 That's a strage way to do this, and will cause out-of-memory errors if you keep entering nunbers. Normally you would use a while loop for this. In that case you can declare and initialise a variable (eg int …

Member Avatar for JamesCherrill
0
204
Member Avatar for StefanRafa0

I know naff-all about javax.amil, but you seem to be trying to override a method with your new javax.mail.Authenticator() { protected javax.mail.PasswordAuthentication getPasswordAuthentication(URLName name) {... but the API doc fpr javax.mail.Authenticator (Java EE 6) only has a `protected PasswordAuthentication getPasswordAuthentication()` method (no parameters), so you are not overriding anything with …

Member Avatar for JamesCherrill
0
214
Member Avatar for kajalDighe

It took about 2 minutes with Google to find [this](http://sourceforge.net/projects/jviewerlite/)

Member Avatar for kajalDighe
0
196
Member Avatar for paku_dnj

DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules Post what you have done so far and someone will help you from there.

Member Avatar for paku_dnj
0
485
Member Avatar for Violet_82

> I don't feel confortable using enum, for some reasons I don't like them, so if I can do without I feel happier. I do hope you will reconsider that. Enums were added to the language in Java 1.5 because Java needed them, and so do you. They are not …

Member Avatar for Violet_82
0
7K
Member Avatar for cherry.basilio2

this may help http://www.roseindia.net/java/java-conversion/BinaryToDecima.shtml ... or not. That's a really tortuous and horrible way to see if a string just contains '0' and '1' (if you can work it out at all, given the lousy coding standards). There may be some good stuff on RoseIndia, but most of it,, like …

Member Avatar for stultuske
0
273
Member Avatar for gyno

Yes. I have that right now (Eclipse with Java 7 and Netbeans with Java 8 preview)

Member Avatar for jwenting
0
232
Member Avatar for somjit{}

Interesting question! To find all the colinear points presumably you can't just take their angles from one arbitrary point - you'll have to repeat that process using each point in turn as the "particular point"? If this is really just about colinear, the maybe there's a simpler answer using the …

Member Avatar for somjit{}
0
544
Member Avatar for solomon_13000

new ImageIcon(...) is famous for not throwing any exceptions when it fails to find the file; it's just empty. JLabel is happy to accept null for its image icon, so the final result is no image and no error messages. We see that quite often in DaniWeb "help!" posts. Use …

Member Avatar for solomon_13000
0
363
Member Avatar for Sacrificer_911

Sounds like a really interesting project! Some ideas: You could use an ArrayList to hold a sequence of U/D/L/R/S(traight on)/B(ack) etc Characters as the genetic code - easy to process and easy to make a new one by mixing from 2 "parents" and making some random additions or substitutions ("mutations"). …

Member Avatar for Sacrificer_911
0
310
Member Avatar for nova4005

if (rollTotal == 10) { rollHist[8] += 1; } (etc) There's a pattern- the array index is always two less than the rollTotal, so all those ifs can eb replaced with a single line of code something like `rollHist[rollTotal-2] += 1;`

Member Avatar for JamesCherrill
1
238
Member Avatar for pvn29

It would help if you told us what the error messages are. Copy/paste the entire messages, complete with line numbers etc.

Member Avatar for somjit{}
0
250

The End.