32,204 Topics
| |
i am havin a problem using a RadioButton to control labels on a panel.Anytime i click on one of the JRadio button it controls all the other panels at the same time instead of only controlling its label on its panel. Please all hw do i go about setting my … | |
[CODE]// PUT YOUR HEADER DOCUMENTATION HERE! import java.util.Scanner; import java.util.Random; public class life { // the size of the grid (GRIDSIZE x GRIDSIZE) final private static int GRIDSIZE = 18; /********************************************************************************/ public static void main ( String args[] ) { boolean[][] board = new boolean[GRIDSIZE][GRIDSIZE]; char choice; int x = … | |
[CODE=JAVA]// This is the Debts program in Java import java.io.*; class Debts { public static void main(String[] args) throws IOException{ BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); String Amount, Payable, Interest, Paid; double Value, Rate, Spent; int Years; System.out.print("Enter Amount: "); Amount=stdin.readLine(); Value=Double.parseDouble(Amount); System.out.print("Enter Payable in years: "); Payable=stdin.readLine(); Years=Integer.parseInt(Payable); System.out.print("Enter Intrest Rate: … | |
I have a collection of objects descended from JComponent that are displayed on an object desended from JPanel. Basically these JComponent-based objects are components that can be added and placed arbitrarily and can be dragged about on the panel. The panel is in charge of repainting all the tools/components that … | |
how to output a string after a count of every 10 numbers ina count of 50 numbers. | |
A java program that creates an array of Student names .Program should give me a change to have the following operations: a.Print all elements in the array. b.Modifies the element at a particular location of the array(delete and add). please | |
I posted a code on this link [URL="http://www.daniweb.com/forums/post915333.html#post915333"]http://www.daniweb.com/forums/post915333.html#post915333[/URL] and the thread was solved, but I'm looking forward for another method using switch case.... but an error says : incompatible types found: java.lang.String required: int is the re a possible way that forces switch case method to use string instead of … | |
ok so i want to read a .txt file line by line. I have the code for that BUT i want to keep track of what line im on, i might be completely braindead from working on this whole project forever but heres the line by line code i am … | |
I have a passkey to authenticate access to a web service in the code of one of my java serlvets. How easy is it for someone to view the code for my java servlet when it is on my web server? It would pose a security risk to my entire … | |
When developing web report, many developers use VMware to simulate different operating systems on a same server. Then, they can realize cross-platform deployment and debug of web report. According to real application of web report, I will discuss three network setting ways of VMware with all of you. [B]Bridge way[/B] … | |
/* *It's a Running program that generates DBF file *Question is: How can I make an IDX file Out of this. *I tried to changed the extension by .idx but I'm not sure if it is *correct. */ package src.maintenance.DBFextraction; import java.awt.Dimension; import java.awt.Font; import java.awt.Point; import java.awt.Rectangle; import java.awt.Robot; … | |
hello.. uuhhmm ... i have a problem here.. i want to know how can i do that if the tuition paid "yes/no": "N" .. then message_error exist that "you need to pay first.." ,. and dont print the result,, but if the answer is "Y" then .. it proceed to … | |
Please let me know how to stop Thread B from Thread A ? | |
im just new here..and i really need some1 who can help me do our exercises..its about java(using looping/iteration)..i know others in java but not yet 'bout looping.. | |
Write a JAVA program that will generate/output the following numbers. 1, 2, 4, 7, 11, 16, 32, 39, 47, 56, 66 (using looping) | |
| I am writing a program that simulates a simple library. It compiles with no exceptions. However, it keeps printing when the printAvalibleBooks() method is called. the exact same book even though I have a method that is supposed to poplalate the array here is what I have so far. [code]public … |
Hello everyone! I'm looking for a class in the Java API that can take the complete structure of a directory in itself and that can be passed on sockets, so it can be used on other machines of a network. Is there someone that can show me an existing class? … | |
Hello - I am trying to catch a NumberFormatException using the code below. However, even though it does perform the System.out.println() in the catch statement when a non-number is entered, it still "blows up" displaying the NumberFormatException with all of its accompanying messy messages in the console. I thought I … | |
i have to print 1 3 2 4 5 i the input output should be 1 3 2 4 5 4 5 6 9 9 11 15 20 26 i am getting a weird output my code is [code] import java.io.*; class nik1234 { public static void main(String args[])throws IOException … | |
I need an example on queue implementation in java | |
Hey guys, Is it possible for a J2ME application to access the devices phonebook? I've been googling but nothing much as turned up. John | |
Write a JAVA program that will input the base and power and display the result: Example: Base is 4 Power is 2 the answer is 16 42 = 16 Base is 2 Power is 5 the answer is 32 25 = 32 Base is 0 Power is any no. the … | |
| Hey guys, I have some Java code here, which checks whether a word is present in a sentence or not: [CODE]import java.io.*; class search_arrays { static void search()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a sentence: "); String s=br.readLine(); s+=" "; String[] x=new String[s.length()]; int a=0,b=0; for(int i=0;i<x.length;i++) { … |
Hi all, I have a task in which I have data of different classes.And I have to perform K-means clustering on each class to reach the right combination of clusters. Can somebody give any link of code or help for this. Thanks Gaurav | |
hi everybody.... i need to make an application to display images in j2me form. i can display those images but the problem is i have to display it in a row... from right to left until all the images has displayed.. and if the screen is'nt enough it will display … | |
i want to create a moving graph whose y value progresses with the slider value.i am confused whether to implement it using JFreechart.Is there a simpler method? How should i go about doing this? | |
hi.. this is my new program .. i want a fix or constant answer like, when the answer in: Student Name: Monica Clare then it proceed to another question.. but when.. Student Name: blah blah then. it shown error_message that it is invalid answer,, .. please help me debugging this … | |
I already have 3 Javascripts working that I trigger within my <td>'s like this: [code]<td onMouseOver="mover(this)" onMouseOut="mout(this)" onClick="mclick('test.html')">Test Button</td>[/code] I have now coded up 1 Javascript function to handle all 3 events (using if statements). But how do I trigger the calling of that function inside my <td>'s? I was … | |
I saw a similar problem to this, but couldn't understand the solution the guy used. I have to sort this tunes program in order by title. It seems like there is a problem with my sort algorithm, but I cannot figure it out. Here are the classes. [code] public class … | |
Hello Sir /Mam, Im starting learner in java.I used db queries like insert ,delete,update only.I want to learn how to use store procedure ,triggers,function with java.can u give some guidence refer some good website to learn db with java and books,tutorials. Plz help me to learn those things.Hopefully i expect … |
The End.