32,204 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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"); … | |
***Can you help me to write a java program to evaluate a mathematical expression written in a a Prefix Order ?? *** | |
***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","",""); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Can any one give me complete struts2 demo with struts-config.xml file specially use of bean and user bean with some discription. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
![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 … | |
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? | |
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 … | |
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 … | |
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.. |
The End.