• Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to blauthor in populate fields and test (inheritance)

    Another version of the above code with output can be found here: http://www.sr2jr.com/textbook-solutions/computer-science/50701006/absolute-java-inheritance
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Adult Website On Portfolio?

    My advice is never do anything you wouldn't want your friends and family (or clients) to know about. Sooner or later they will find out, and in the meantime you …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in create textbox dynamically

    There is only one way to create a text box in Java, and that is to dynamically create a new instance at run time. So what exactly is your question?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how to create java application in visual studio

    http://bfy.tw/4hKQ
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how to emit and collect arraylist in storm

    OK, that explains it! We still need to see more code. How/where is `listI` defined and initialised? Did you confirm its contents immediately before the `emit`? It seems unlikely that …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in how to emit and collect arraylist in storm

    OK. Firstly there's a translation problem. "bolt" has no relevant meaning in English. Secondly, you post two pieces of code that have absolutely no connection or variables in common. You …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to james sipha in chess game

    help me with full code for chess game in java
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to stultuske in chess game

    hello James, If this is your first visit to DaniWeb, welcome. If by some chance you've mistaken the forum for "coderz-for-hire" or if you thought you saw a big "We'll …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Method to read more than one java file call it in main program

    That code does not return a null, or anything else. It's not valid Java and it won't compile. (However it's easy to see why it would return null if it …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Method to read more than one java file call it in main program

    What code did you try?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Android Checkbox Update PHP MySql

    It's only doing what you told it on lines 3-9. What do want it to do when the box isn't selected?
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Android Checkbox Update PHP MySql

    Your code is your responsibility, but here's a trivial example you can adapt: String s; if (myCheckBox.isSelected()) s= "option is selected": else s = "option is not selected";
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Android Checkbox Update PHP MySql

    You don't test to see if the check boxes are checked ( `isSelected()` ), you just get their text (which you knew anyway)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in java

    Looks like you messed up your brackets. At line 66 you are still in the QuestionListener inner class, wheras I expect you inetnded to close that class definition first and …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to stultuske in How do you study programming?

    IMO it's not really a good recommendation. First of all, don't look for a book that's "for beginners". Look for a book that decently teaches and explains the material, so …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in class relationships (Inheritance+composition)?

    There's nothing wrong with what you are doing. It happens all the time, eg Employee has a subclass Manager (inheritance) Every Employee has a Manager (composition) Every Manager manages (has) …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to eden100 in WindowsError: [Error 206] The filename or extension is too long:

    Use Long Path Tool, Long Path Tool can simplify and probably end your problems in unlocking, managing and renaming files that appear to have a long filename.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Gave Reputation to Ammar_7 in Quiz using GUI in which A countdown timer shows Time LEft

    use timer function for that it will work for you................................
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in when i opend my java program i see this error: illegal character: \u000

    DId you use NetBeans? If its set up right it keeps the previous versions of all your source code.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    I'm really not the person to ask - I learned Java by writing Java programs over 20 years ago, but before that I had 25 years experience programming in more …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Getters and Setters not passing for JRadioButtons

    You call the getters OK, but you don't do anything with the JButtons that they return. In your original code you used public variables to refer to the radio buttons. …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Why Buffer Reader is Not Reading the File?

    Line 82 (the main loop) you start each pass of the loop by reading the next line. That's correct, but on line 80, before the loop, you also read one …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in How can I ignore comments statements /*.....*/ when i reading java file??

    Don't forget that `/*` can appear inside a line comment, and thus may not have a matching `*/` `//* this is a valid Java comment without a closing delimiter` And …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Why Buffer Reader is Not Reading the File?

    16 mSec is 1/60 second. That's the clock resolution on simple computers. If your PC has a more accurate timer you can get it via System.nanoTime() YOu didn't say wats …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    "Without using code" means "in Netbeans GUI designer"? If so I can't help. In my opinion the GUI designer is far more trouble than it's worth for any real life …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Program to convert numbers into words in visual basic 2008

    And I bet he'll be really happy to get an answer that fails to meet the stated requirement for a recursive solution.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    You want a number of panels each occupying exactly the same space and you want just one of them to be visible at any time and you don't want tabs? …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Object Oriented Semester Project

    Conway's Game of Life is good fun and has lots of graphical potential (eg a drag'n'drop library of interesting known shapes)
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    OK. If you don't want the tabs then you can place a whole lot of JPanels at the same place and make all except one invisible `setVisible(false)` When you want …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Compressing Text

    Thank you for posting your assignment - I'm assume your teacher gave you permission to post their intellectual property on a public web site? You don't seem to know whqat …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    Did you read the link I gave you for JTabbedPane? That's what it does.
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    JTabbedPane? https://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    Q1 - don't understand the question. It is in the scope, and lines 52-56 have nothing to do with it Q2 - updateGui takes an instance of ActionEvent as a …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    You seem to have tried to incorporate the SimplestTimer code and got that wrong. Line 142 will create a new instance of the SimplestTimer class, but that has no relevance …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    Sounds like you are having layout manger problems, for example, the default LM for a JFrame is a BorderLayout, in which if you just add a component without saying where …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in unturned not working. low fps when detail distance maxed. 2.4ghz i5

    Yes. Its your graphics hardware, not the CPUs. A 2.4 i5 will be perfectly adequate with a decent graphics card. One of my machines has HD3000 graphics. Its fine for …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in what am i missing here

    It's a very difficult decision, and I wish you all the best whatever route you chose to take. There's no shame in this - we all have out inbuilt talents …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in what am i missing here

    Hi THis is almost identical to the problem you had six months ago https://www.daniweb.com/programming/software-development/threads/498758/tell-me-what-is-wrong-with-this and that was almost identical to an even earlier one a year ago https://www.daniweb.com/programming/software-development/threads/489301/payroll But you …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    Starting at the top... You create a Timer by giving it a time interval (1000 mSec in this case) and an ActionListener (the same as an ActionListener for a JButton …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    Its a mistake to try to learn basic principles from a sample as complicated as that. Because the weather here is horrible and I have nothing better to de I'll …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Quiz using GUI in which A countdown timer shows Time LEft

    Forget thread and sleep - it doesn't work well in a GUI You need a Swing Timer that will update your GUI at regular intervals. Here's a couple of tutorials: …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in last node in linked list not showing

    Hericles has the right analysis, but the solution is simpler than he suggests. Here's a hint that should get you thinking in the right direction: What happens when you call …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in computer science

    No, it would not be benificial at all. Cheating by using someone else's answers is an insult to the original author and an insult to your teacher. Do your own …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in OOP Text Based Java Game

    I think you are having a little joke at our expense. :) If you are not familiar with Java and don't know any text adventure games then who gave you …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in OOP Text Based Java Game

    OK Bradley, it's time to get off your butt and start actually doing something. Nobody here is going to waste one more second on this until you start to show …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Probability and Coin Tossing

    I'm sorry, but the "random" functions in major languages are not so terrible that they would give such significant non-random results. That's a complete red herring. Please re-read my previous …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Probability and Coin Tossing

    I think I know why as well.... A is looking for a,b,c B is looking for -b,a,b the trials are rotating as described. For A to win you need to …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Probability and Coin Tossing

    OK, got the answer. You have to rotate the throws as you describe until someone wins, then throw a complete new set of 3. With those rules I get T,T,T …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Probability and Coin Tossing

    OK, I tried generating each trial as (sorry, did some renaming since last code posted) ThreeCoins nextIncrementalRandom() { return new ThreeCoins(b, c, Face.nextRandom()); } and got the same results - …
  • Member Avatar for JamesCherrill
    JamesCherrill

    Replied To a Post in Probability and Coin Tossing

    Ah, yes. I was generating 3 new random each time. I;ll try shifting them as you described and report back...

The End.