32,204 Topics

Member Avatar for
Member Avatar for amvnwguy

Hey, I'm new to this site and asking for help in general, but this prompt my teacher gave us to do makes no sense to me at all. I dont know if he is asking us to input values manually from the keyboard into the 2 dimensional array or if …

Member Avatar for stultuske
0
114
Member Avatar for java123456

hey guys , I don't understand why the outPUT is that for the code below.. can someone please explin me how it works. Thank you. class example{ public static void main (String[]args){ int i = 1,j; while (i<=3){ j=i; while(j<=4){ System.out.println(j+" "+i); j=j+2; } i=i+1; } } } HERE IS …

Member Avatar for maurice91
0
161
Member Avatar for viona.diminarthi

hei, please help me. I have a project sales .. in the form of sales transactions I would add an update on caret functions texfield subtotal. caretupdate function I use to buy goods at more than one then it will be totaled automatically which will go on with new texfield …

Member Avatar for stultuske
0
371
Member Avatar for caierhui

import java.awt.event.ActionListener; import javax.swing.JFrame; //This Java Program determines the weighted average //of four test scores. //import statements for the needed packages public class Assign1 extends JFrame { //declare JLabel variables as reference to label components //declare JTextField variables as reference to input/output text boxes //declare JButton variables as reference to …

Member Avatar for love1969
0
207
Member Avatar for Kronolynx

I'm trying to write an applet with menus but is not working I'm getting these errors: load: MenuFrame$AppletMenu.class can't be instantiated. java.lang.InstantiationException: MenuFrame$AppletMenu at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) could some one please explain me what is wrong. …

Member Avatar for Kronolynx
0
132
Member Avatar for Umesh17_89

I am doing image segmentation using region growing algorithm. I have created Region and Pixel class where each region has list of pixels. public class Region { private List<Pixel> pixelList; } Pixel class has fields like r,g,b, hue,saturation, brightness of individual pixel in image. The result of segmentation is list …

Member Avatar for Umesh17_89
0
231
Member Avatar for sofien.fkih

I have created a csv file, and display data from database into that file, how can I add a pie chart to that file, this is the code which I made: File file = new File("C:/Users/MY TOSHIBA/Desktop/chart.CSV"); Writer output =null; output = new BufferedWriter(new FileWriter(file)); Connection con = DriverManager.getConnection("jdbc:oracle:thin:@ 127.0.0.1:1521:XE","username","password"); …

Member Avatar for sofien.fkih
0
418
Member Avatar for hala.qaddoumi

***Can you help me to write a java program to evaluate a mathematical expression written in a a Prefix Order ?? ***

Member Avatar for hala.qaddoumi
0
1K
Member Avatar for vipin.luhach

***How To Search Value From Data Base and IF Data is Not Available then show a message "Data Is Unavilable" My Codes are as Follows :-*** private void Sf_Reg_search_ButtonActionPerformed(java.awt.event.ActionEvent evt) { String str2 = JOptionPane.showInputDialog(null, "Please Enter Staff Reg No: ","Enter Reg No For Search", 1); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:HMS_DS","",""); …

Member Avatar for stultuske
0
216
Member Avatar for wannafzan

This is my assignment. I've done it 36 hours straight and I can't think properly so my program looks like kindergarden kid's program. Basically, we have to do a GUI for Pizza ordering. Everything works except for the amount. The output for amount is "0.00". I have to send it …

Member Avatar for wannafzan
0
2K
Member Avatar for arcticman452

I have a program that figures out what the total cost for gas is on trip. I now have another piece made where you enter the trip data to save it to a file. How do I make the main program call this new window so the user can enter …

Member Avatar for arcticman452
0
128
Member Avatar for meenal9

I am confused "HOW to make a series of numbers in reverse orDer In java" I got the basic idea but i cannot join them together ...in this program compUtter Will identify weather input is binary or decimal .i am unable to make computer identify numbers in.please help wit Java …

Member Avatar for meenal9
0
284
Member Avatar for nah094020

Ok final project of semester is to make a maze with gui , i started with the disjoint class already but am a bit confused on how the walls or cells will work with disjoint sets, has in how do i go about creating them will this work? , my …

Member Avatar for JamesCherrill
0
681
Member Avatar for moone009

I found this example online and cannot figure out why it will not work. I was wondering if anyone could help me figure out why this code does not work ive spend a few hours tinkering with it and no luck. I learn best by example and just basically need …

0
122
Member Avatar for javaprog200

Hello, I have a class (Buttons.java) which inherits from JButton and implements the ActionListener interface. The second file (ButtonsTest.java) creates a GridLayout of Buttons and adds them to the applet. The issue I am having is when I click on any of these buttons, the event is not registered. I …

Member Avatar for JamesCherrill
0
267
Member Avatar for Violet_82

Hi I am having problems running and compiling a program with more than one class, but I am not sure how to do it in netbean, it keeps complaining. I have the 2 following files called respectively Account.java public class Account { String name; String address; double balance; } and …

Member Avatar for Violet_82
0
298
Member Avatar for Violet_82

Hi I am having some problem understanding the do-while loop in the following program, and I was hoping for some help: import java.io.File; import static java.lang.System.out; import java.util.Scanner; class DeleteEvidence { public static void main(String args[]) { File evidence = new File("c:\\cookedBooks.txt"); Scanner keyboard = new Scanner(System.in); char reply; do …

Member Avatar for Violet_82
0
196
Member Avatar for maheshwarianand

Can any one give me complete struts2 demo with struts-config.xml file specially use of bean and user bean with some discription.

Member Avatar for Taywin
0
111
Member Avatar for sofien.fkih

I did the coding to create a pie chart file in png format file, the pie chart shows the percentage but in the bottom of the file, I want the percentage to appear in the chart itself, This is the codes I have used, String query = "SELECT name,flag from …

Member Avatar for Taywin
0
455
Member Avatar for jg1405

I am not seeing why this code will not generate the output to my JFrame after it takes the input from the text file? How can I tweak this code to do that? Take input from file and display it on JFrame... JTabbedPane jtpane=new JTabbedPane(); JPanel jpan=new JPanel(); JTextArea txt=new …

Member Avatar for jg1405
0
1K
Member Avatar for oneoderja

Your demo code is required to (DO NOT manually print out, write a FOR loop to do it) 1. print all white furniture 2. print the total cost of all furniture in the array. // How do i print these using my code: public class FurnitureDemo { public static void …

Member Avatar for JamesCherrill
0
220
Member Avatar for aravind326

Hi, I have a text file, which i need to make sure is not getting modified. I have to mail this file to people and the file should not be modified by anyone in transit. What would be the best way to accomplish this. Posting it here because I was …

Member Avatar for JamesCherrill
0
125
Member Avatar for Violet_82

Hi there, as I am learning java (providing I will have the time to keep going!) I was wondering if there is anywhere I can find some simple exercises to practice with. At the moment, as an introduction, I am reading a java for dummies book, so I am still …

Member Avatar for Violet_82
0
120
Member Avatar for MrsWhit

I have been working on this for a while and keep getting error after error. It seams like every time I fix something, I get an error for something else. This is the main class. import java.util.Scanner; //for scanner class public class ArrayOps { private int[][] numbers; //Holds a 2D …

Member Avatar for gavinflud
0
191
Member Avatar for arcticman452

I have 2 JComboBoxes that are using an itemListener, right now the code I have compiles but when I call for tankSize and fuelCost to complete my calculations nothing is returned and my answer is always zero. What do I need to change so the variables transfer to tankSize and …

Member Avatar for arcticman452
0
132
Member Avatar for Zubenna

![GUI](/attachments/large/4/GUI.jpg "GUI") ![GUI](/attachments/large/4/GUI.jpg "GUI") My name is Nnamdi. I am a new member in this forum. I am learning Java programming and how to develop Java GUI application. In my learning process, I have encountered the challenge stated below. My question: I am writing an application to properly align the …

Member Avatar for Zubenna
0
862
Member Avatar for drivehard-gopro

I have started using eclipse for developing an android application and eclipse automatically aligns on the form the textboxes, labels and buttons that i place. Is there a way to disable this and place them wherever I want and resize them as I want?

0
72
Member Avatar for rafaelzm2000

Hello I need some help completing a quiz program the program simulates a Java quiz I have completed most of the program but there are three issues that i am unable to overcome I tried some of the solutions that i found on daniweb and on google but they didnt …

0
68
Member Avatar for tingwong

Hi everyone, I have a project that creates a Train that pulls Boxcars. The boxcar is supposed to be generic type and have attributes such as load that adds only a specific type of object to the boxcar. The train is supposed to pull all boxcars created. I have written …

Member Avatar for JamesCherrill
0
336
Member Avatar for komabasi

write java programme, using DO and WHILE to approximate 22/7 (pi)= 4-4/3+4/5-4/7+4/9-4/11+4/13..

Member Avatar for subramanya.vl
0
475

The End.