35,618 Topics
![]() | |
Need help getting my add, save, search, modify, delete buttons to work I can get them to show up in the GUI but pressing them does nothing. I need the save button to save file to index.dat in folder c:\\data\ folder and create that folder if it doesn't exist [CODE]import … | |
hey guys, I'm making a small app that make a Jable and saves the table model then loads the table model and set it to the table interface and both saving and loading is in seperate frames. [CODE] // Saving the info String ufname = Fname.getText(); String ulname = Lname.getText(); … | |
Hi I have this problem where I tell the user to prompt 10 integers separated with spaces. And then I have to output the same numbers the user entered and then output max and min numbers. So How can I get the maximum value of these multiple integers? This is … | |
The user input four integer numbers in same line,for example,4857 After the input, I would like to place the four numbers into array The result ,array[i] = j i is the position , j is number of input. how to do it? must require to use substring? any other solutions? | |
I need help with incrementing my score. I tried ++wins..., wins++..., wins += 1..., wins = wins + 1... and so far nothing works. I just keep getting 0. My main class: import java.util.Scanner; public class Test { public static void main (String [] args) { Rock game = new … | |
What should I write within a while loop that allows me to keep on divding a number by 2 until it meets certain conditions. for example while(condition) { //what should i write here to have a double that divides by 2 until it meets the condition. } | |
Hey guys, I've constructed the main class to refer to a variable in it and I receive a stack overflow error. Any suggestions on the causes of this error, I've used this method previously and have not got this before. [code] In other class: MainClass class = new MainClass(); errors: … | |
good day could anyone solve this error ??? it occurs in the below code for (int i = supportedLocales.length-1; i >= 0; i--) { %> <a class ="langChangeOn" onclick="javascript:document.repost.locale.value='<%=supportedLocales.toString()%>';<%= session.setAttribute("userId",supportedLocales.toString())%> ; document.repost.submit();"> <%= supportedLocales.getDisplayLanguage(supportedLocales)%> </a> <% } } %> any support is highly appreciated | |
I tried to compile the program and I got these two errors and I do not know what they mean. (Lab4 is the name of my program by the way) Lab4.java:22: incompatible types found : java.lang.String required: double double fedwithHolding = "FedTax * GrossPay"; Lab4.java:26: incompatible types found : java.lang.String … | |
In this project I'm suppose to use a old project and create a menu for it. Basically "Create a menu system so that the user may choose between the various Roach functions (create roach colonies, breed and spray roaches and get the current number of roaches). Make sure you display … | |
my program includes pictures and audio, do i have add that to my project and then create a jar file? or i just have to include the source file and that's it? | |
Hai i have using the checkbox in for loop. I need the urgent help from anyone, for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are unchecked. I need to get the values for checked checkboxes and … | |
[code]class node { public int data; public node LC,RC; public int shortest; } class minleftist { node root = null; public void insert() { int newelt=0; try { System.out.println("Enter the element:"); DataInputStream din=new DataInputStream(System.in); newelt=Integer.parseInt(din.readLine()); } catch(Exception e){} node temp = new node(); temp.data=newelt; temp.LC=temp.RC=null; temp.shortest=1; if(root==null) root=temp; else root=melt(root,temp); … | |
Hey guys, I'm drawing a grid using the nested for loop with draw line method. Any tips on getting this in the center of my screen? I am currently using the getWidth and getHeight methods of my center panel but it is still drawing in the top left corner. It's … | |
[CODE]public class Card { public Card(String cardValue) { input = cardValue; } public String getDescription() { if (input.length() == 2) { if(input.substring(0,1).equals("A")) first = "Ace of "; else if(input.substring(0,1).equals("2")) first = "Two of "; else if(input.substring(0,1).equals("3")) first = "Three of "; else if(input.substring(0,1).equals("4")) first = "Four of "; else if(input.substring(0,1).equals("5")) … | |
I just wanted to know what famous algorithms that you should have in hand? or be familiar with? or That is always used? | |
[CODE]public static void main(String [] args){ ArrayList<String> list1 = new ArrayList<String>(); list1.add("ABC"); list1.add("123"); ArrayList<String> list2 = method(list1); list2.add("ABC"); list1.add("123"); System.out.println(list1); System.out.println(list2); } private static ArrayList<String> method(ArrayList<String> list) { ArrayList<String> result = list; result.remove("123"); return result; }[/CODE] Could anyone explain this code to me? why it gives me the same result … | |
Hi.. I need a java program to find out the bandwidth in LAN.. Please help me in solving out this problem soon... Thanks in advance.. | |
Hello guys, Sorry for the title, it should be Renting bicycle program XD Can't edit XD I've got a task from my school. I've to create a new computer system for Oslo City bikes. The Oslo City Cycle bike racks at various locations around Oslo where people with valid bike … | |
Please help. I ask the users to give me a char (either X or O), but when the users play the game, all they see are squares. Thanks!! [CODE]//game class import java.util.Scanner; public class Game { Player player1; Player player2; Board gameBoard; public Game() { player1 = new Player(); player2 … | |
Hello everyone, I am new to this java programming and wanted to know if anyone could solve this problem for me. I would greatly appreciate it. Thank you! "Write a program that asks the user for 2 integers a and b, the program displays their sum, difference, product, quotient a/b, … | |
I have an assignment to create a class Input and have method public static int readInt(Scanner in, String prompt, String error, int min, int max) I was provided the main method but have no idea what I'm supposed to be putting in the class Input. This is what I have: … | |
Write a program that computes the average and standard deviation of the text floating point numbers in a file. Use the following formulas for the average and the standard deviation of N values. The formulas compute the sum, the sum of squares, the average, the average square, the variance, and … | |
The standard deviation of a list of numbers is a measure of how much the numbers deviate from the average. If the standard deviation is small, the numbers are clustered close to the average. If the standard deviation is large, the numbers are scattered far from the average. The standard … | |
I tried to broadcast an object using object serialization and UDP connection. I am using netbeans IDE and i use a Java Desktop Application for both sending and receiving ends.Obect is broadcasted when a button is clicked. And i get the following exception... Oct 29, 2011 1:50:04 PM receive1.Receive1View jButton1ActionPerformed … | |
I have a server to which clients are connected using TCP connection. All the clients broadcast to each other using UDP braodcasting.I want to disconnect one of the client from the UDP connections from server. what can be the possible ways to do this? please suggest. | |
i need to Pass in three integers corresponding to an RGB value and use the appropriate Color constructor to set the background color. [CODE]import java.applet.*; import java.awt.*; public class AnAppletSubclass2b extends Applet { int r; int g; int b; //Color color = new Color (r,g,b); public void init() { String … | |
I need help in creating a RPN calculator! I'm currently stuck in making a stack. here is my codes so for.This is my first time I am using stack. [code] import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.math.*; public class JavaCalculator extends JFrame{ Stack s = new Stack(); … | |
when i login the page then it navigate to the home page and when i logout then i came back to the login page, the problem is that when i click the back button in the browser then the page navigate to the home page without login it.. |
The End.