35,618 Topics
![]() | |
Well I am now starting a new program and it evolves get the users height, weight, age and then calculating it into hat, waist, jacket sizes. I have to have four made methods in it also. One for each clothing size and on for asking the user if they want … | |
Hi, I need help in creating a never ending array using java. It should basically work like and ArrayList but should be done using arrays. | |
Hello. I have been reading some stuff on the action command pattern. ever heard of it? More inportantly, Do you understand it? Because I do not. although I would like to ask if the following class could use the command pattern as aposed to 'if" or "switch" statements. I understand … | |
To code pretty much makes a grid of a check board. However I want to modify it so if I click on any cell of the grid of the checkerboard it will display a red circle. If I click on a cell that already has a circle, it will remove … | |
Hello everybody! I have to Questions to ask please: 1) How can I find the maximum value in a single linked-list recursively? this is what I tried to do: int findMax(int key){ Node max=head; while (max != null){ if (max < max.getKey()) return(max.getNext()); } } it ends up to an … | |
The task is to be able to move the alien right, down, and left. So far all i can get the alien to do is move right and down. I need to get it to be able to move left. Can you help me please? import java.awt.Graphics; import java.awt.Image; /** … | |
Hello Members, Can anyone recommend any easy-to-use and free Java Script IDEs? Thank you!! sciprog1 | |
Tell me if this makes sense structurally. I have a final this week and this homework will not be graded till after the final. I was just curious if I have as firm a grasp on this as I think I do. [CODE]public class account { private int id = … | |
hi can any one please help me how to retieve dynamically loaded data in a html radio button in to jsp page.. actually i tried to load user account no from database in to radio buttonin html..this worked perfect .. but upon clicking the submit button i want to get … | |
so the question is to print out strings that appear both in the two given lists, assume each list does not contain duplicates of the same word. so with the signiture of [B]public void intersect(Node n1,Node n2)[/B] and suppose we already have another method: [B]public boolean contains(Node n, String target)[/B] … | |
Hi! please help me for how can i scroll through database using JDBC. if i m creating 4 buttons say First,Last,Next,Previous. First button will take me to the first record of the database. Last button will take me to the last record of the database. Next and Previous will show … | |
Hi I made a browser game with php and a little bit of java script, the ask a random question, then i dynamically load answers as image links, which the participant should select the correct one, if it is then he will go to the link the image href points … | |
I need to make this a popup when a button is clicked. This is the code for the Button. [CODE] JButton moreOptionsButton = new JButton("More Options"); moreOptionsButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { timer.stop(); } } );[/CODE] I need this information to come up in a new window. … | |
Hi, I basically have 1 arrayList with 10 elements. [CODE] //arraylist with10 elements private ArrayList<String> arrayList1 = new ArrayList<String>(); //arraylist with nothing in it. private ArrayList<String> arrayList2 = new ArrayList<String>(); public void copy() { Collections.copy(arrayList1, arrayList2); } //The code above will copy all the elements in the first arraylist to … | |
I'm trying to make my for loop print ODD numbers and print their sum and average. Here's my code: public class Loop_For2 { public static void main (String[] args) { double sum = 0f; int ctr = 1, ctr2 = 0; for (;ctr<=10; ctr++, ctr2++) { System.out.println(ctr); sum += ctr; … | |
For my project I am sending the HTML value from one text editor. For that I had set the character set to UTF-8. Here I am sending value through URL. In the text editor I am Providing the facility of changing the color of text. Now when I change the … | |
I'm not sure why it's not calculating right. When I enter a negative number, the if else statement or something does not register it's a negative number. There is a before and after, and you can see where it does not register negative numbers. Thanks in advance for your help! … | |
Hi there, I'm having a weird error, When I click on my submit button my eventhandler that should be capturing the data from my JTextField is throwing an error : This is my first week using Java so I'm sorry if this is a newb thing. My Main function simple … | |
Been working on this for 2 hours non stop. Can't seem to figure out exactly what's the problem. Perhaps I'm taking a wrong approach to this problem. Right, I need to copy a singly linked list to another new list. Can use any method EXCEPT RECURSION. Here's the code so … | |
Hello I just started working with JTabbedPane tabs. I have been using the index to navigate the pane. Now I add and remove tabs from the pane so clearly the index navigation is no good. Does anyone know some code for an easy solution for using the title or something … | |
I am good at created a little block diagram; however, I struggle with tracing these out and I have a midterm in a few hours. I am confused about all the casting and also about #4 and #7. I thought #4 would be a compiler error because the "Decared Type" … | |
Hi, Im new to java, mostly done networking in the past, im trying to create a program that will run a basic simulation of a number of heats for a 100m sprint. It mostly about the use of collections so nothing to complex but im completly lost. I've created a … | |
Here is the start of my program. I am having a little trouble linking the farToCel/celToFar user defined methods with the final equations in the action statements. The output is whatever the user enters and 0 for "fah" and "cel". Example: displayTF.setText(inputTF.getText() + " Celsius is " + cel + … | |
plz help.....in solving this problem While developing the Virtual University Learning Management System (LMS), there was a requirement stated that: “Students should be able to post their questions on MDB of LMS, so that it may help them to clarify their concepts in case of any confusion, after they have … | |
Hi please help me with paging as i am searching it for last 3 days but no success I have a table in JSP ,which is getting values from java / database and displaying record via beans here is my JSP code [CODE]<logic:iterate name="list" id="user" scope="session"> <tr><td><beanOld:write name="user" property="username" /></tr></td> … | |
So I have an array and I need to get the values of it that are larger than a set integer. It would be something like this apart from it doesn't work due to different data types. [code]myVariable = array[i]>otherVariable;[/code] where myVariable and otherVariable are integers. Any help? | |
Hello all, This is a very simplistic simulation but i'm hoping to show bacterial growth using this simple piece of code. [CODE]public class Bacteria { boolean living; Bacteria x; int population; public void spawn() { living = true; try{ Thread.sleep(2000); } catch (InterruptedException e ) {} Fission(); try{ Thread.sleep(100000); } … | |
Is there no such thing as hasNextChar? I'm trying to make a program to figure out a grade point average, and a solution I've come up with to deal with the +/- is to assign it as a char and give it a value from there, but I run into … | |
I made a flowchart that will print counting numbers 1-10 automatically, and I'm supposed to print their sum and average at the end. Now, I have to convert the flowchart into three Java programs: For, While, DoWhile. I'm having a bit of a problem on the flowchart and the programs. … | |
Hey .. Everyone ... I'm now to java .. I'm trying to figure out .. how everything fits together .. well .. i have a project that I'm working on .. .. basically it a type of quiz working on java .. where a user takes a simple MCQ quiz … |
The End.