32,204 Topics

Member Avatar for
Member Avatar for bigmouthmonster

Write a program that has only one button in the frame. Clicking on the button cycles through the colors: red --> green --> blue --> gray --> red --> and so on, one color change per click. In addition to the setBackground( Color.color ) method we have been using, you …

Member Avatar for javaAddict
0
93
Member Avatar for chama89

I'm running Eclipse for Java. I created a DOM version of an XML file. Now I want to change an attribute of an element in the file. I called a method that called a method in the class that controls the DOM, and I got a dialog box saying "JDI …

Member Avatar for patrick076
0
1K
Member Avatar for mozten

Ok, so I created a Desktop Application in Netbeans for my class's final project, the thing is I have to present it to my class at my school, but the computers there only have jcreator, how would I get it so that i can compile a netbeans desktop application project …

Member Avatar for javaAddict
0
98
Member Avatar for bebe11bebe

this is my code - i have three classes and i will post all since i have no idea what i'm doing apparently [CODE]public class OneTwoTest { public static void main(String[] args) { System.out.println("Welcome to One-Two Match!"); Game g = new Game(); g.play(); System.out.println("Thank you for playing."); } // end …

Member Avatar for haseena04
1
3K
Member Avatar for beforetheyknew

I dont really know specifically what im searching for, which is why i haven't just found this via searching the web. Have you guys come accross or know of any sort of quiz questions like where it gives you a for loop which isn't in the normal format and then …

Member Avatar for dongbv
0
108
Member Avatar for datuna

hi i have write LSD radix sort but it does not work can anybody help me? here is code public class LSD{ public static int R=1<<8; public static int bytesword=4; public static void radixLSD(int a[],int l,int r){ int aux[]=new int[a.length]; for (int d=bytesword-1;d>=0;d--){ int i, j; int count[]=new int[R]; for …

Member Avatar for jwenting
0
70
Member Avatar for bigmouthmonster

Write the ideal weight calculator so that height in inches is entered by using a slider. Use the approximate formula: W = H2 / 30 , for female W = H2 / 28 , for male where W is the ideal weight in pounds, H is the height in inches …

Member Avatar for jwenting
0
77
Member Avatar for Raakesh399

Hi every one!! I have a java program and i don't know how to delete a record from an array of objects using JOptionPane

Member Avatar for jwenting
0
89
Member Avatar for WesFox13

Hello all, I need a bit of help with this program, I need to make my code create a complete binary tree using an array. As well as create a driver class that displays the tree graphically Here is what I have so far with my code Tree Code: [CODE]import …

Member Avatar for WesFox13
0
168
Member Avatar for puppykillaz

I am getting an error message that is quite new to me. I normally can call methods without incident but this time, I saw a new error message. This code is sample coding I am using to see how to fix three of my issues. First Class [CODE] public class …

Member Avatar for puppykillaz
0
307
Member Avatar for chrisMed7

Hello i have an assessment to make a car park in GUI and i have tried some stuff but didnt work I need to make in two classes one with the main method and a JFrame container and the other with the buttons for park controls and others Any help …

Member Avatar for JamesCherrill
0
96
Member Avatar for b89smith

I am trying to download an excel file that is avalible on this site: [url]https://www.arcavision.com/Arcavision/index.jsp[/url] Once you are logged a frame opens where you fill out a form and then click submit. On pressing submit the result of the query shows and gives you the option to download the data. …

Member Avatar for Stefano Mtangoo
0
154
Member Avatar for P00dle

Okay, so I'm having problems with my code. I've browsed Daniweb and couldn't find any solutions on here that work. I'm extracting 2 sets of texts from a .xml file. The first part is a directory name(eg. "C:\work\") and the second part is the name of a file in that …

Member Avatar for P00dle
0
4K
Member Avatar for chris evans

Im working on Java app that stores sms and parses this sms. i have them stored in a text file in this form; "21M32113Good19F41324Agree..." i want to parse messages in this form "Age Gender Ans1Ans2Ans3Ans4 Comment" e.g "21 M 32512 Good".i also need to insert new line breaks to separate …

Member Avatar for jwenting
0
47
Member Avatar for Daffodil_Thursday

I am trying to include this piece of code in my Java Class. But the compiler tells me that it can't find Class Calendar. I can't create a class within a class though, can I? Any advice on how I can link this in to the rest of my code? …

Member Avatar for Daffodil_Thursday
0
4K
Member Avatar for sivaprakashm

I need to calculate percentage relative to a particular bar within the series in a barchart Could any one help me out

Member Avatar for jwenting
0
61
Member Avatar for sawant_nitesh

I want to develop a JAVA application which can send and receive SMS. I have a mobile phone connected to PC through USB cable. This JAVA program in PC should be able to send and receive SMS. AT commands are used to instruct mobile phone to send/receive SMS. But how …

Member Avatar for peter_budo
0
500
Member Avatar for ceyesuma

I have a combobox on a panel that changes tables on the panel. How would I get it to repaint if this panel was on a JTabbedPane in a InnerFrame in a JDesktopPane? It repaints but after I switch for one tabs and then back to the said tab. thanks.

Member Avatar for JamesCherrill
0
85
Member Avatar for sivaprakashm

[code]BarRenderer barrenderer = (BarRenderer) plot.getRenderer(); DecimalFormat decimalformat1 = new DecimalFormat("### %"); barrenderer.setItemLabelGenerator (new StandardCategoryItemLabelGenerator("{2}",decimalformat1)); barrenderer.setItemLabelFont (new Font ("Bold", Font.PLAIN, 12)); barrenderer.setItemLabelsVisible (true);[/code] In eclipse I got the StandardCategoryItemLabelGenerator cannot be resolved to a type in the below line StandardCategoryItemLabelGenerator I import import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; there also i can get redline below …

Member Avatar for JamesCherrill
0
183
Member Avatar for revenge2

Hi there, is it valid to have a java class name and file as [CODE]public class DVD extends Items{[/CODE] and [CODE]public class CD extends Items{[/CODE] where its all in capitals? -thanks, sorry for the short question.

Member Avatar for JamesCherrill
0
210
Member Avatar for evak77

I need my rows to allign like this and my code is below, can someone tell me what I should do. Loan 1 15,000 12% 60 $333.67 $5,020.20 $20,020.20 Loan 2 15,000 10% 48 $xxx.xx $x,xxx.xx $xx,xxx.xx Loan 3 15,000 08% 36 $xxx.xx $x,xxx.xx $xx,xxx.xx [CODE] import java.math.*; import java.text.*; …

Member Avatar for peter_budo
0
91
Member Avatar for rowdyboudy

Hi Guys, As you will see from my code snippet below, I have a masked text field that only allows the user to input a number between 0 and 9. I have wired up an event as when the user inputs a number I need to extract the number and …

Member Avatar for peter_budo
0
104
Member Avatar for Fisher78

Write a program that simulate a die roller. The user should type in the number of the throws. Let the program count how many ones, twos, threes... are in the series. In the end the program should write down how many ones ... that was and also figure out the …

Member Avatar for javaAddict
0
120
Member Avatar for soUPERMan

[CODE] StringTokenizer st = new StringTokenizer(line); while (st.hasMoreTokens()) { String wordIn = st.nextToken(); if (wordIn.endsWith(".")) wordIn = wordIn.replace('.', ' ').trim(); if (wordIn.endsWith("?")) wordIn = wordIn.replace('?', ' ').trim(); if (wordIn.endsWith(",")) wordIn = wordIn.replace(',', ' ').trim(); String result = bd.searchBase(bd.getWords(), wordIn, 0, bd.getWords().length -1); if (result != null) System.out.println("Word found \n"); else …

Member Avatar for masijade
0
767
Member Avatar for FoziaZafar

can any1 kindly help me how can i wirte in database using JDBC, i had alredy made connection with me database,,, so plz tell me how to write in database access file?

Member Avatar for jwenting
0
116
Member Avatar for ceyesuma

Hello The ActionPerformed will not unload the viewPort to load the new viewPort that holds a table. is there a way to reload the table? The first actionPerformed supplies the table but the next will not remove table and add the new one. [code] package view.content.panels.guide; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; …

0
55
Member Avatar for zango

So the following is where I think the problem lies in my code: [CODE]public void actionPerformed(ActionEvent i) { int temp; double newtemp = 0; String inputString; inputString = infield.getText();//pulls the number that was entered in the input field temp = Integer.parseInt(inputString);// makes a new variable to handle the input //tells …

Member Avatar for javaAddict
0
752
Member Avatar for johndoe444
0
46
Member Avatar for ketanbembi

Hi i am new bie to swings. if i have a JTable. And i want to add number of rows with different number of columns like Employee1, Software Developer, swings Employee2, software developer What is the way of adding rows having different number of columns to a JTable Thanks.

Member Avatar for DeadSoul
0
152
Member Avatar for Vivek Varma

im a little on the weak side in loops.....n hearing that programs are solved by bright people here.....i am requesting help with a few programs in loops...i dont understand them...and am expecting you people to help me 1- ******* _***** __*** ___* __*** _***** ******* NOTE-(_) MEANS SPACES 2-Write a …

Member Avatar for genevish
0
71

The End.