35,618 Topics

Member Avatar for
Member Avatar for Lendaanx

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 …

Member Avatar for JamesCherrill
0
157
Member Avatar for amture101

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(); …

Member Avatar for amture101
0
129
Member Avatar for subone

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 …

Member Avatar for JeffGrigg
0
261
Member Avatar for kelvin924

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?

Member Avatar for hiddepolen
0
96
Member Avatar for overrated

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 …

Member Avatar for JamesCherrill
0
119
Member Avatar for pikalife

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. }

Member Avatar for JamesCherrill
0
162
Member Avatar for StephNicolaou

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: …

Member Avatar for JamesCherrill
0
207
Member Avatar for lalyahyan

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> &nbsp; <% } } %> any support is highly appreciated

0
44
Member Avatar for lele07060

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 …

Member Avatar for hiddepolen
0
148
Member Avatar for cecsFTL

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 …

Member Avatar for cecsFTL
0
389
Member Avatar for plasticfood

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?

Member Avatar for plasticfood
0
176
Member Avatar for ttamilvanan81

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 …

Member Avatar for stultuske
0
538
Member Avatar for hannah shrn j

[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); …

Member Avatar for JeffGrigg
-1
261
Member Avatar for StephNicolaou

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 …

Member Avatar for StephNicolaou
0
245
Member Avatar for TigerTeck

[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")) …

Member Avatar for TigerTeck
0
329
Member Avatar for chiiqui

I just wanted to know what famous algorithms that you should have in hand? or be familiar with? or That is always used?

Member Avatar for JeffGrigg
0
234
Member Avatar for rotten69

[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 …

Member Avatar for JamesCherrill
0
192
Member Avatar for vidhya33

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..

Member Avatar for JamesCherrill
0
98
Member Avatar for Stjerne

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 …

Member Avatar for Stjerne
0
829
Member Avatar for StephNicolaou
Member Avatar for hayden11

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 …

Member Avatar for hayden11
0
436
Member Avatar for lele07060

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, …

Member Avatar for JeffGrigg
0
3K
Member Avatar for lbgladson

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: …

Member Avatar for stultuske
0
169
Member Avatar for looklikeasfine

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 …

Member Avatar for stultuske
0
114
Member Avatar for javaman2

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 …

Member Avatar for stultuske
0
2K
Member Avatar for jwala

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 …

Member Avatar for peter_budo
0
362
Member Avatar for jwala

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.

Member Avatar for jwala
0
269
Member Avatar for mike2828

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 …

Member Avatar for PkayC
0
181
Member Avatar for ali11

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(); …

Member Avatar for stultuske
0
546
Member Avatar for vinaysrk

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..

Member Avatar for anand01
0
54

The End.