Hi, Greg,
I solved it now. I just had to think about it differently because I didn't understand his approach. Thanks anyways for the response.
Type: Posts; User: help_desk
Hi, Greg,
I solved it now. I just had to think about it differently because I didn't understand his approach. Thanks anyways for the response.
Well, here is his code:
I didn't quite make much sense out of it. I did ask if he could elaborate more on it. I understood his idea that you can't use the !option.equalsIgnore("Y") when it is N...
Yes sir. That is what I am looking for.
Sorry Greg IF I didn't make sense. Here is what I want to make sense of: I want the user to either choose Y or N for the loop to quite. Should the user enter any other character aside these two, the...
Hi PhHein,
I see the logic in it but how could I write it such that only when the user enter's Y or N will the loop stop because based on whether the user enter's Y or N, the programme goes into...
Could anyone point me to why when the user enters Y or N, this loop still continues looping instead of quitting?
Thanks
System.out.println("Enter Y to indicate Up OR...
The value_input is a user entered value in degrees. So, the user enters a value in degree e.g 23 and then enters the LS in knots e.g 5knots and the calculation is done using the formular:
AS =...
In other words, such conversion is baseless? That is what I want to know.
Suppose you are given the following :
AS = Air-speed (in mph) LS = Landd-speed (in knots) value_input = speedWalk...
Hello guys,
I have a maths application I am working on in java. This is more related to maths but there could be some here who have worked with calculations like this in their java project.
One...
Hi Kevin, I have added an MCVE. I am hoping anyone could help me with this. Thanks
Hello guys,
I have a String as follows: "the|boy|is|good"
now, I want to split this string using the "|" delimeter.
I tried this :
String line = "the|boy|is|good";
line.split("|");
Hi Kevin,
Yeah, I have tried things. First, i just set the JComboBox with the ListCellRender. so, jComboBox.setRenderer(ListCellRenderer); but how to create the model is the problem. There has to...
Hi guys,
Say I have a student class with fields names and Gender. Now, I have a students' array. such that I can create multiple students' classes: student a, student b, student c e.t.c and store...
Thanks alot @Cornix. Supposing the JList lists the names of the student and I wanted to click on a name so an event is fired that would do something else..any pointer or idea on how to fire such...
@Conix, please could I just ask you a question? Instead of JList, could I use a JComboBox with the DefaultListCellRender?
@Cornix, thanks alot. you have been patient and gentle to my questions. I appreciate.
import java.awt.Color;
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;
import Student;
public class...
Hi Conix,
Please, I need some clarifications. I have done abit study but I need to understand somethings from your code as most examples are NOT so explanatory. Which of my classes given in the...
Hi Conix,
Ok, I will try to study that as I don't know much about it and see if I can get it done . Should there be some stuffs I couldn't get, hope you will be willing to assist me? Thanks.
Hi Greg,
It's ok. I accept your advice. Might even look into it later. Meanwhile, I am displaying the student on the JList but a student has a name and an ID. How would I modify my custom JList...
I have added a top level container now. The JFrame. The component fires up but then, how would I rewrite my custom JList model so I can only display the names and not the IDs of the students?
---...
Hello Greg, I have run everything and all is fine now. So, now when you run the code and hit the "click me!" button, instead of it to go the lines below from the controller class and fire up the...
Sorry Greg, I have added the main and made some adjustment to the if() condition. Let me know if you are able to run the code now.
Thanks
Hello ,
I don't know if the MVCE I have provided is OK. I think this should work and still be understandable. I have implemented the observer pattern as well as the MVC to make things clearer. So,...
I am trying to use the JList to display a list of students. Now, each student has a first name, last name and course taken. each courses taken by the student has its' own name, level and idNumber....