4,084 Posted Topics

Member Avatar for paichow

Mounika, I think it's safe to say that after 3 years, either they found the sollution, or are no longer looking anyway.

Member Avatar for stultuske
0
3K
Member Avatar for ObSys

well, you could write to several types of files. you can go for rtf, then [this](https://code.google.com/p/jrtf/) might be a good starting point. you could also store your layout information in a xml file, and use that template to generate a pdf file, containing the text you want, in the layout …

Member Avatar for JamesCherrill
0
278
Member Avatar for tyler.dahle

doesn't need to be an abstract class. actually, a normal class would be better, since I doubt you would be adding abstract methods in there. just create a Scoring class, that contains all the methods that are equal for all of them, and have you YathzeeScoring/MahJongScoring/... extend that Scoring class.

Member Avatar for JamesCherrill
0
228
Member Avatar for reiferdinan.picar

so, you just copy pasted the code you've found in a six year old thread without checking against the current version of Java... congrats. if it's due tomorrow, even the bugfixing stage should have been finished by now. you may want to organize your schedule a bit better next time.

Member Avatar for stultuske
0
326
Member Avatar for FaialShahzad
Member Avatar for Start4me

by declaring inputCharacter outside of that if statement. the compiler will check all possibilities of that code, one is: the if statement will not be executed, hence, the inputCharacter variable is never declared, yet you do try to use it.

Member Avatar for Start4me
0
289
Member Avatar for tukky

I think you're making your code way to complex. first, TextReader should do nothing more then the name describes: it should read (and return) the text. nothing more. then, you have in your working class a String containing the text. use the split method to get the seperate words in …

Member Avatar for tukky
0
591
Member Avatar for tqmd1

text-align:left; this might explain why your text isn't centered. re-read your css code for your header id. also: using classes, instead of id's is a better approach. it makes it easier to re-use them.

Member Avatar for stultuske
0
91
Member Avatar for Derek_4

castajiz_2: you may want to re-read the code snippet. as ObSys points out: if the item is found during the iteration, it doesn't return null, so "always return null" is incorrect.

Member Avatar for sebastianedu
0
298
Member Avatar for nathan.pay.9

since the results are supposed to be random (roll of the dice) there is no such thing as 'expected results'. don't use if-else for iterations, use an actual loop for that: [do-while, while](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/while.html), [for](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html) .... it's not as if you haven't got any options. using if else blocks for this, …

Member Avatar for nathan.pay.9
0
473
Member Avatar for tqmd1

how do you know it's not running? do you get an error? does it change all the textboxes? does it change the wrong one? have you tried debugging, or just adding alert messages to check what runs when?

Member Avatar for tqmd1
0
130
Member Avatar for mufasil

well, if this is the code that runs when you click, what you describe is completely normal. what you could do, is at the end of your actionPerformed execution, set the button to disabled. or, better yet, since the contents of your db may have changed, as first action of …

Member Avatar for mufasil
0
245
Member Avatar for Mr.M

1. what kind of interface? gui? interface type? ... 2. what has your question got to do with interfaces? 3. "there were some errors" ... waaaaay to vague, please be more precise.

Member Avatar for Mr.M
0
248
Member Avatar for lakshmishree
Member Avatar for sankubha
Re: JaR

you can run it as a webservice, and only provide users the code which connects to that service, so they don't have the actual .class files locally, meaning they won't be able to decompile.

Member Avatar for stultuske
0
139
Member Avatar for Pyler
Member Avatar for JamesCherrill
0
219
Member Avatar for rafiqtolas

[Google](http://www.google.com) would have found [this](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html) for you in less than a minute. put some effort in it. anyway, if you don't know about this stuff, I would recommend against going to job interviews for Java development positions.

Member Avatar for JamesCherrill
0
153
Member Avatar for kenadams

ehm ... you don't "have to", not according to Java anyway, maybe it's a part of the exercise you are reading? anyway, the following code: String s = "asdf"; String s = new String("asdf"); would not compile, since you are declaring two variables with an identical name. maybe the book …

Member Avatar for kenadams
0
250
Member Avatar for mikewyatt

I don't see how you would do that. what you could do, is first read in all the elements, so that you will be able to sort them, and then add the contents as items to your list.

Member Avatar for mikewyatt
0
1K
Member Avatar for Stpdoug

you're getting an error on line 198 and you think we know what that line does (wrong) by only showing us 38 lines?

Member Avatar for Stpdoug
0
176
Member Avatar for sbhavan

personally, I don't really see the point of this. not to mention, you risk a lot of overhead. what you could do is to use cookies. when you login, you store your username and "logged in", or better yet, a timestamp, which you update while you're on the webpage. when …

Member Avatar for rubberman
0
479
Member Avatar for RaniThomas

wonderthegreat: this thread is years old. if they haven't got it to work yet, I doubt they ever will.

Member Avatar for stultuske
0
2K
Member Avatar for sankubha
Member Avatar for scottyg95

they need to be in two seperate java files with their own names (equal to the name of the public class). you can do it in one, but then you need one of the classes not to be public. also: don't forget the closing brackets for your classes. don't create …

Member Avatar for stultuske
0
340
Member Avatar for Stpdoug

try and stick to the naming convention, it 'll make your code easier to read. "it doesn't work", is a very vague description. has it ever occured to you that maybe the record you are looking for doesn't exist? there are quite some reasons why this might go wrong. did …

Member Avatar for Stpdoug
0
337
Member Avatar for tr1stina

seems to me you are looking for 'OrderNo' while you should be looking for 'orderNo'. your method is 'getOrderNo()', the name you should use is that methodname, without the get, starting with a lower case.

Member Avatar for tr1stina
0
2K
Member Avatar for sankubha

since it extends the class public server(){ desk. ... } should do the trick. make sure it's instantiated first, though, meaning your run method must run before your server constructor (which is not possible) or you must instantiate your desk variable in your server constructor

Member Avatar for JamesCherrill
0
144
Member Avatar for sk8ergirl

"the other method doesn't work".... 1. read the file's lines into a resultset 2. while line != null -> line = resultset.nextLine(); add line into arraylist >> this is the logic for reading >> start with the arraylist, to which you've made the changes write it to the txt file …

Member Avatar for JamesCherrill
0
252
Member Avatar for aelajj

that would depend on the datatype. he can go and use the Integer wrapper class, instead of the int type. that way the default value will be null. after entering the values, he can simply replace the 0 valued ones by null as well.

Member Avatar for JamesCherrill
0
1K
Member Avatar for jeromesturt

there is no "best answer" there's just the answer. the throws keyword is used in the signature of a/the method, to indicate that it might throw a certain type of Exception, forcing all the methods that call this method, to either implement some exception handling, or to throw the exception …

Member Avatar for Shaun_2
0
236
Member Avatar for jackbauer24
Member Avatar for durim.kryeziu.927
0
1K
Member Avatar for booicu

"chipping people for better intelligence"? IMHO, if you allow yourself to be "chipped" like that, you've already proven you'll never reach 'better intelligence' anyway. the human mind and brain make quite the pair, and they do a pretty good job on their own. ok, you'll have to do some effort …

Member Avatar for G_Waddell
0
463
Member Avatar for JohnSoftware

ehm ... a JTextArea has a certain text, not lines of text. if it's flat text in there, without an indication of where a line ends, you can't just search line by line afaik.

Member Avatar for mKorbel
0
750
Member Avatar for stanley.dominic

take a look at the sticky threads on top of the java forum, they're meant to give beginners advice on what to begin with and where to find that information.

Member Avatar for Helpmeplease123
0
219
Member Avatar for ndeniche
Member Avatar for sasikrishnasamy
Member Avatar for stultuske
0
97
Member Avatar for chdboy
Member Avatar for sterno68
Member Avatar for JamesCherrill
0
563
Member Avatar for bostondevin
Member Avatar for stultuske
0
264
Member Avatar for lauraroxi
Member Avatar for <M/>
Member Avatar for <M/>
0
1K
Member Avatar for nathaniel23456

you need to realize that "A N Other" is not a numerical value, hence can not be casted to a number, which is what you are trying to do on line 13. go over the logic step by step, and either re-think your code, or your input.

Member Avatar for stultuske
0
219
Member Avatar for enakta13

only trolls? is that why you are on it? has it occured to you that maybe nobody replied because you're description was way to vague? my guess, starting a thread which is defined in the main class, and pausing or stopping it when clicking it on the second button. do …

Member Avatar for stultuske
0
383
Member Avatar for nasaha

this is not a "code on demand" forum. the caesar cipher is very easy to code in Java. how about first giving it a try, and then if it doesn't work, show us what you've done, and explaining where it goes wrong.

Member Avatar for stultuske
0
144
Member Avatar for ghfeyn

did you notice those posts are years old? there 's no reason te revive dead threads. it's better to create your own.

Member Avatar for JamesCherrill
0
6K
Member Avatar for nathaniel23456

what do you mean, you don't know how to input the data? it's you who should know. anyway, there are different ways. if you are using a command prompt, you can use a Scanner to read the input, and a loop to iterate over the different students. you could also …

Member Avatar for stultuske
0
102
Member Avatar for malkani.ji.73
Member Avatar for madhura_1

somehow, I doubt your JComboBox to refresh. the code you posted here won't even compile, since you are using variables you don't declare.

Member Avatar for madhura_1
0
404
Member Avatar for Violet_82

actually, yes, it is. it is a static member of the Font class: http://docs.oracle.com/javase/7/docs/api/java/awt/Font.html#PLAIN

Member Avatar for Violet_82
0
161
Member Avatar for MariannJ

why exactly do you not group your radiobuttons? are they both supposed to be checkable at simultaneously? then maybe checkboxes are more suited. users might assume that only one of your radiobuttons might be selected.

Member Avatar for stultuske
0
178

The End.