35,618 Topics
![]() | |
I'm trying to make a program that has the possibility to vote for different people. When a vote is added to a person, I want the pie chart above to change according to the votes. I have everything done except for the part of the pie chart changing. This is … | |
I've found really good information/tutorials online for writing from my java application to my MySQL database. Can someone direct to one on retrieving information from my database to store as variables in my application? Thanks Peace and love, oldezwe | |
I imported all the required jar files into build path, and almost all other eclipse class and events, e.g. SWT, widgets, graphics, selectionevents are working. However, but when I try to create an instance of CoolBar and DateTime, found that import these 2 classes are unavailable, and importing SWT.*, SWT.widgets.* … | |
So I was given a code about IO to understand [CODE]// The "FileIO" class. import java.awt.*; import hsa.Console; import java.io.*; public class FileIO { static Console c; // The output console public void writeFile () { PrintWriter output; String fileName; c.println ("Saving a File in Java!"); c.print ("Enter file name: … | |
I have an assignment on recursion that calls for me to use recursion to find the largest element in an array. I have a general understanding on how recursion works but this problem throws me off because I can't figure out how to correctly implement the getMaximum() function which is … | |
I am trying to access a varible value from a return fuction in another class. Everytime I attempt to access the variable, it returns a null value. This is selecting from a choice control Part of the first class called CheeseBread [CODE]public void itemStateChanged(ItemEvent e) { if(e.getSource() == total1) { … | |
I'm working on a program for class that uses the method Math.random( ) to generate random integers between 1 and 6. Then generate ten-thousand numbers between 1 and 6. Then calculate the number of 1 that has appeared, the number of 2 that has appeared, and so on. The final … | |
Hello everyone, I'm new to Java. I found this site and the members to have a lot of knowledge and was hoping I can get some assistance. I have written this 2D array code to find the lowest value in each row and return the values. "getLowestInRow" is the method … ![]() | |
I am writing code that opens notepad, but when I want to write an exclamation mark it throws an error; here is the code I am using to write the exclamation mark. [CODE] robot.keyPress(KeyEvent.VK_EXCLAMATION_MARK); robot.keyRelease(KeyEvent.VK_EXCLAMATION_MARK); [/CODE] Why is it giving me the error? | |
package ch07_auxiliaryclasses.taxcalculator; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class UPAdvisor extends JFrame implements ActionListener { JButton displayadvice = new JButton("Displayadvice"); JTextField displayadviceTxt = new JTextField(11); JSpinner ucasPointSp = new JSpinner(new SpinnerNumberModel(0,0,180,10)); JRadioButton Degree = new JRadioButton("Degree", true); JRadioButton FoundationDegree = new JRadioButton("Foundation Degree", false); ButtonGroup bg = new ButtonGroup(); … | |
I need to ask the user for 3 dates (mm/dd/yyyy) and then it needs to print the earliest, latest and the average year. I am TERRIBLE at this & am taking the class because I have to. I don't know how to compare dates any other way than how you … | |
[code] public class Book { String title; boolean borrowed; public Book(String bookTitle) { } public void borrowed() { } public void returned() { } public boolean isBorrowed() { } public String getTitle() { } public static void main(String[] arguments) { Book myBook = new Book("Da Vinci"); myBook.name = "The Da … | |
Hi guys ive been working on this mini pokedex program. unfortunately im having a little problem. Im so sleepy right now and I think i need help. [CODE]/* Program Description: a mini pokedex */ import java.util.Scanner; public class Pokedex { public static void printOptions () { System.out.println(" POKEDEX ver 1.0 … | |
for a gridworld program. i basically need to check a random grid cell, see if anything is there, then transport an actor to that location. I think the method i have to use is get(location) to check or something. But I dont know how to use it. | |
[CODE]package ch07_auxiliaryclasses.taxcalculator; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class UPApp extends JFrame implements ActionListener { JButton displayadvice = new JButton("Displayadvice"); JSpinner ucasPointSp = new JSpinner(new SpinnerNumberModel(0,0,180,10)); JRadioButton Degree = new JRadioButton("Degree", true); JRadioButton FoundationDegree = new JRadioButton("Foundation Degree", false); ButtonGroup bg = new ButtonGroup(); JButton doneBtn = new JButton("DisplayAdvice"); … | |
I am working on j2se bluetooth program which acceps connection from clients or (bluetooth devices). I encountered an runtime exception in my application which says UnsatisfiedLinkError. I googled about it but thought posting here might get an detailed explanation & solution.. The error goes like this.. [CODE]Exception in thread "main" … | |
Whats up everyone I have a question, but first of all I know how to read a file, write to it and all that good stuff I was wondering how do I manipulate data from one. I want to take this .txt file and compute the gpa by taking the … | |
I am working with Java RMI. I have created my client in netbeans. After failing to use rmic in netbeans i created stub file using rmic on command prompt and placed the file in my project folder's build\classes directory.Now when i run the server from command prompt, binding takes place … | |
I cant seem to save these data correctly I have mainly doubles and strings, I am saving these in a .txt file called "autosAudi.txt", I get these weird codes and boxes and sometimes for whatever reason Chinese in my textfields? Here is a example of what appears: [url]http://www.flickr.com/photos/63259070@N06/6449175293[/url] as you … ![]() | |
I'm supposed to be making an inventory program with a logo. I can get the inventory part working fine in a jframe, and I can get the logo working fine in jpanel, but if I combine them it starts acting really weird. Every time I click a button, it generates … | |
Hi everyone i have this simple banking program here and i was hoping someone could help me jazz it up.. Something simple like making it easier to use or making it look better. Just trying to go beyond what was asked for.. [CODE] import javax.swing.JOptionPane; class MiniLab5z { public static … | |
I do not know how to do this and can not find how on google. I want to add code to my action listener to disable a jButton after it is clicked an then enable it again after x amount of time. anyone know how to do this? | |
So here is what I'm trying to do: I have a file with a list of ip addresses eg.(123.45.6.789:80) I have two arrays; ip and port, what I want to do is break the address and place the parts into the arrays. so 123.45.6.789 would go into the ip array … | |
Hello; Is there a way in java to create a flip card effect. I have two pictures, that are to form a double sided card. Ive come with a way to snapshot them in different angles and finally iterate through them in a loop. Its not very good :) Is … | |
Server Code [CODE]import java.io.DataInputStream; import java.io.DataOutputStream; import java.net.ServerSocket; import java.net.Socket; /** * * @author efron */ public class Server { public static void main(String[] args) { try { ServerSocket serverSocket = new ServerSocket(Integer.parseInt("49999")); System.out.println(serverSocket.getLocalPort()); while (true) { System.out.println("Waiting for Client...(port = " + 49999 + ")"); Socket acceptSocket = serverSocket.accept(); … | |
Hello Dani-Web participants, I have an problem, I currently have simulation that runs fine in console, and now our teacher wants us to put it into a GUI type format. The problem that I am having is that the cancel button and close (X) button does not work what so … | |
Dear all sir, i'm a begining of java and i have a problem to write the equation in java code , i want to make it in for loop and i also want to count it by column.how do i do? please me!!! example: f[1][1]=5.4; f[2][1]=5.0; f[3][1]=1.5; k[1][1]=|f[1][1]-f[2][1]|+|f[1][1]-f[3][1]-|; k[2][1]=|f[2][1]-f[1][1]|+|f[2][1]-f[3][1]-|; k[3][1]=|f[3][1]-f[1][1]|+|f[3][1]-f[2][1]-|; | |
Hi can you help me please to Write a java class which prompts the user for an hourly rate (a double). The program should then calculate the wages for a 40 hour week using a while loop to count the hours and adding the hourly rate each time to the … | |
i am using java, how do i get the database to tell me how many elements are in it and save that as an integer | |
Hi, I am a new Java Programmer.could you help me in resolving this. I am trying to created a JPanel withing a main JPanel. For the nested one, i have included Grid Layout and i am trying to add components to it dynamically. i.e i have added a combo box … |
The End.