32,204 Topics
| |
Hey, I've been recently coding a java program for the High Low dice game. I'm absolutely sure of my logic in that I know what i have to do, it's just executing it. Methods and how to call them are my main crux. I'm stumped at the moment, and I'm … | |
Hi, I am suppose to run a for loop into an array of 26, 6 times. The point is to gather the six largest numbers and put them in ascending order. I have been trying everything for this and cannot come up with a solution. The directions I am given … | |
| Hello people I have a JFrame which container is a JPanel: can you give me a piece of code that shows how to create a grid of rectangles ? I need this information for my poject Thank you |
I am trying to learn more about using HashMaps in java. I would like to write a program that searches through a list of jumbled words from one text file and returns the unscrambled word(s) from another text file. Any suggestions how to do this? | |
| The code I pasted is for a school assignment where we have to calculate the monthly payment for 3 different loans, with varying interest rates, and then display some information about each payment for each of the 3 loans. My code compiles and runs fine (not finished commenting all the … |
How do we compile on top of Java Virtual Machine.Could you guide me on how the JVM works. | |
Okey , This is suppose to be a chat and server program and I am down to the last part but I cant seem to figure this out. I Use the JtextField to get the Input from the user and it is suppose to hold it until the sent button … | |
Hello everyone! Once again I need some help on this program. I need to write a program that reads integers, finds the largest of them, and counts how many times that number occurs. The program should end when 0 is input. My teacher gave us a hint, incase this helps … | |
I've gotten the basics of insertion code but I'm stuck on how to compare it with another condition other then (list by A-Z, Z-A) for the example a list of staff ranks were given : [CODE] public static final String[] staffrank = { "Trainee", "Junior", "Senior", "Administrator", }; [/CODE] I … | |
Hello. I have a piece of code currently where I have a JFrame that I have removed the title bar and borders etc from using .setUndecorated(true). I have tried a number of ways with no success to make this window draggable by it's client area. [CODE] JFrame f = new … | |
I was given a client and server and I have to create a gui for it. I have done the entering part using the JTextField and the problem is getting the output of the class to go to JTextArea. (Its a Client server simple chat program) Here is the set … | |
Hi I have a String as "ABC("zscxfdb") OR DEF("ghg5dfg5") OR GHI("sdghrhrhr"). I should take the String present inside DEF() alone.. Can anyone help me in this.. Thanks in advance... | |
My project is to write a Temperature class. In addition to converting between Celsius and Fahrenheit also include Kelvin. The class has read(), add(Temperature), subtract(Temperature), multiply(Temperature), divide(double), equals(Temperature), toKelvin(), toFahrenheit(), toCelsius(), and toString() methods. Methods add, subtract, multiply, and divide all return a Temperature. [CODE] public class Temperature { public … | |
| Ok, I have absolutely no idea what is going on for my compiler errors. I am not worried about the last part where I have to put in the letter code. I am just trying to figure out how to make this compile correctly for line 43 to work. I … |
Hey so i have a class that extends a JFrame with an image of mickey mouse and a piece of cheese. I have made it so the user can control Mickey and I want to have it so that when he touches the boundaries of the cheese a YOU WIN … | |
i need help with my code here is what I have import java.util.*; public class Payments { private double myLoan; private double myInterest; private double myPayment; public void Payments() { Scanner pay = new Scanner(System.in); System.out.print("Principal Loan = $"); myLoan = pay.nextDouble(); System.out.print("Annual Interest Rate(%) = "); myInterest = pay.nextDouble(); … | |
Hi, I am working on client authentication(in a sample JSP application) using certificates. I have written a code to extract the client information from the client certificate. Now I wanted to use certificate's serial number to identify the particular use from the database. I extract the serial number using [CODE]<%= … | |
The below program works fine, but I want to add data exception using try and catch, can anyone please help how and form where I can start it? [CODE]import java.util.Scanner; public class ElseElseIf { public static void main(String[] args) { int number1,number2,number3,number4,number5; int largest, smallest; int twoDigitNumbers = 0; int … | |
Do you have any ideas of how to bring Swing to a web site? Not use applet, but Swing only. Any sample code is appreciated. MyDreamGirl | |
Hi there, So I'm given a programming problem for a class, and here's what's given: An n x n game board is populated with integers, one nonnegative integer per square. The goal is to travel along any legitimate path from the upper left corner to the lower right corner of … | |
I instantiate a class called Company where I have a lot of the logic of my system, I'm unsure about what visibility the following objects should have.... [CODE] public class Company { private Scanner input = new Scanner(System.in); private Employee[] employee = new Employee[100]; private Job[] job = new Job[100]; … | |
I have been asked to create a method to merge two LinkedList. I am allowed to use only the following methods: From LinkedList: > addLast(E); > size(); From ListIterator: > E next(); > boolean hasNext(); > E previous(); > void remove(); The first list (list1) points to 2,6,7 The second … | |
Hey guys, not sure what thread to put this in, please direct me to the correct one if this one isn't it. I'm struggling with a sub report in iReports. I have a report that selects from a MSSQL database, and uses a sub report to do a select from … | |
Hi, Im new to java im trying to study sorting methods specifically bubble sorting i found this code online but couldn't understand what it means. can someone kindly comment the codes so I can uderstand it well. TIA here's the code [CODE] public static void sort( int a[], int n … | |
Hi all, [CODE]import java.io.*; import java.util.*; class MapDemo{ public static void main(String args[]){ Map<Integer, Object[]> tMap = new TreeMap<Integer, Object[]>(); Object[] values = new String[] {"Tree", "Map"}; tMap.put(1, values); System.out.println("Keys of tree map: " + tMap.keySet()); System.out.println("Values of tree map: " + Arrays.deepToString(tMap.values().toArray())); } }[/CODE] The above code works good … | |
This is a class for a bigger project. I programmed it sepratly so that i know it will work when i include it in the project. This is a Palindrome project. SO i want to know if the a word is a palindrome or not. I get the program to … | |
Hi there, I wrote this client/server code but i can't make it work. and every time i try to debug the code the program goes in an infinite loop when executing the receive function. This is the client code [CODE]package client; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import … | |
Im switching too much between these "wrapper" frameworks so I think I should just concentrate on one and leave the others alone. Which should I go for in a servlet like enviroment? JNI, JNA or Swig? The only one I have "expirence" with is JNI. The rest Im playing around … | |
Hi everyone, i just want to ask you help and solicit you ideas in java because i'm a beginner in Java. I have a project that some what like POS (point of sale). But may problem is i have no idea how to to. The problem is, I made a … | |
| Hello people, I have a 2 dimensional array of integers where 0 indicates a road and 1 indicates a wall: can you give me a general idea on how to draw a maze according ot my matrix on JFrame window that has JPanel as its contente pane ? Thank you … |
The End.