hi james Been a while since I have been here. am trying to do this program for the longest while. I have tried read and writing to a text file in java and i am getting a runtime error. can someone tell me where and why I am getting the runtime error. … Discussion Thread by divinity02 in Software Development
… whole `finally` block (lines 39-50) try(BufferedReader br = new BufferedReader… Reply by JamesCherrill
3 Weeks Ago
public class StudentListings{        private String name;   // key field         private int ID;         private double GPA;         private int next;         private int size;   … Discussion Thread by Daron_1 in Software Development
…("George", 3, 1.50); obj1.ShowAll(); } Reply by Daron_1
3 Weeks Ago
public class StudentListings{        private String name;   // key field         private int ID;         private double GPA;         private int next;         private int size;   … Discussion Thread by Daron_1 in Software Development
…("George", 3, 1.50); obj1.showAll(); } } Reply by AssertNull
3 Weeks Ago
public class StudentListings{        private String name;   // key field         private int ID;         private double GPA;         private int next;         private int size;   … Discussion Thread by Daron_1 in Software Development
…("George", 3, 1.50); obj1.insert(l1); obj1.insert… Reply by Daron_1
3 Weeks Ago
public class StudentListings{        private String name;   // key field         private int ID;         private double GPA;         private int next;         private int size;   … Discussion Thread by Daron_1 in Software Development
…("George", 3, 1.50); System.out.println(obj1.insert… Reply by Daron_1
3 Weeks Ago
…, hour long shows actually had 50 minutes of time. Now it… Discussion Thread by Reverend Jim in Community Center
…; 20minutes per competitor) Fear Factor = $50,000 per ~6 person-hours… Reply by Agilemind
2 Weeks Ago
… value of Class 1 is 50 and the value of Class… 1's value) I get 50, but what I need is… Discussion Thread by Alfred_6 in Web Development
1 Week Ago
…: 60>Marks>50 Grade D: 50>Marks>40… Discussion Thread by shantuli in Software Development
Write a program in C++ using if/else operator with nested statements to find the grade of a student. The detail is as follow. grade >= 90  Grade A grade >= 80  Grade B grade >=70  Grade C… Reply by Imran_21
1 Week Ago
… value of Class 1 is 50 and the value of Class… 1's value) I get 50, but what I need is… Discussion Thread by Alfred_6 in Web Development
Hi, I'm not sure if this is what you seek for. But here's a way to do it somehow: assuming we have the following SELECT element with a class of "parent". jQuery(document).ready(function($){ $('.parent').children('option').each(… Reply by essential
1 Week Ago
…setSubscription_rate() { subscription_rate = 4.50; } public String toString(){ …setSubscription_rate() { subscription_rate = 3.50; } public String toString(){… Discussion Thread by Jason_24 in Software Development
First of all try usin JUnit and unit test the methods one by one Reply by Shulc
1 Week Ago
Hello, I have been strugling with this for a while. Is it possible to create a loop that will make this function run automaticly. I want to type in how many times it should repeat the pattern. For example, i want to run to $sum20 Please help me out!… Discussion Thread by eoop.org in Web Development
php
…: [sum] => 10 [sum2] => 50 [sum3] => 250 [sum4] =>… Reply by cereal
1 Week Ago
I use jQuery UI .droppable for dropping elements to divs. Now I need to prevent dropping to divs with class .box if they are not empty. if ($('.box').is(':empty')) { $(".box").droppable({ }); } But this … Discussion Thread by Ivan_17 in Web Development
…; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.2em… Reply by essential
1 Week Ago
…setSubscription_rate() { subscription_rate = 4.50; } public String toString(){ …setSubscription_rate() { subscription_rate = 3.50; } public String toString(){… Discussion Thread by Jason_24 in Software Development
@Shulc besides the fact that this is a dead thread, how would that help anything? to shine some light on the issue at hand: NewspaperSubscriber[] subscribers = new NewspaperSubscriber[6]; for (int x = 0; x < subscribers.length… Reply by stultuske
1 Week Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
4 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
The reason this is confusing is that the code lines 52-57 are coded inside the loop 40-61 but they are not executed in that loop. They are executed only after the Timer has expired. It runs like: do {labelX = 10; die = (int)(… Reply by JamesCherrill
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
That is exactly what I don't know how, and my deadline is approaching fast. It is easy to change structure this ot that way, but how to preserve desired functionality? I replaced original FOR with timer, and now have to pack outer loop there too. I … Reply by Sinisa_1
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
You are right about EDT choking. That's why all your "looping" has to be done by a repeating Timer, not a for/while/do loop. I'll say it again. You cannot use a loop for this exercise - it won't work. No loops, OK? "Timer inside Timer&… Reply by JamesCherrill
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
~~~~~~~~ ... move the label ... if it's not at the end yet then there's nothing else to do on this tick, so return <------------- THESE TWO LINES +) ... (the label has moved all the way across, so..) <… Reply by Sinisa_1
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
The timer is a repeating timer that fires every 200ms Every time it fires you move the label 36 pixels right So it moves at a speed of 180 pixels every second (5 steps/sec) No loop When it reaches the end that's when you roll the die and reset the … Reply by JamesCherrill
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
So it will go like this (every ... is one tick): ... timer fires and disables button ... timer fires and rolls the die ... moves label (for those 36 pixels) ... check if it is end, if not, moves 36 pixels AGAIN ... (and again, if not the end of road)… Reply by Sinisa_1
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
That has absolutely no resemblance to the pseudo-code I posted earlier (did you read it?), and definitely will not work. Maybe I confused things by talking about "ticks". In animation like this a "tick" is the same as one timer event … Reply by JamesCherrill
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
This solution works just OPPOSITE of desired. It moves label only ONCE for 36 pixels before rolling. (Desired was to go all steps till the end before new roll). It rolls die for every STEP, instead of at only the end of road. Thanks for your time… Reply by Sinisa_1
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
No, that's not right. It does exactly what you asked. Maybe you're not reading the pseudo code correctly? On the first move (timer event) the label will not be at the end, so you return from the actonPerformed immediatley. You don't go on to roll … Reply by JamesCherrill
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
... and just to be absolutely certain I have edited your code into the structure described above and tested it. It executes exactly as you described. It took a few minutes, so it's not a big job. Please try it. If your version does not execute as you want… Reply by JamesCherrill
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Reply by JamesCherrill
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
I knew my old single-task way of thinking was messing with my Java, but I didn't realize how much. (Pascal and fortran for DOS, 30 years ago.) I must apologize to you for my disbelief. And I mean REALLY APOLOGIZE. I'm sorry I acted like a complete … Reply by Sinisa_1
3 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
Hey, no need to apologise - I know how frustrating it can be when you look at code and you just can't see what you're looking for. I too started on traditional procedural programming (IBM 360 PL/!) and I still remember how hard it was to switch to event-… Reply by JamesCherrill
2 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
No, I have NetBeans 8.2, Java SE 8 , Java EE 8 (not using yet). One guy told me to not use Lambda Expressions (yet), because "sooner or later you will compile for Android, so learn to stay compatible with Java 1.6 or lower" (his words). So, … Reply by Sinisa_1
2 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
Thank you for your thank you. The world is such a scary place that there's no such thing as being too kind or too nice. And yes, after putting effort into trying to help, feedback is very very welcome. The one thing in that code that made me cringe was… Reply by JamesCherrill
2 Days Ago
….add(roll); label.setBounds(30, 50, 100, 20); roll.setBounds(10… Discussion Thread by Sinisa_1 in Software Development
Well, for each step of labels I added "beep();". And that "sleep" marks transit from series of dings for first label, to second. You can clearly hear the little longer pause between "beeps". It was the first thing that came… Reply by Sinisa_1
2 Days Ago