32,199 Topics
| |
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 … |
This is a frighteningly subtle bug I first learned about in C (Andrew Koenig's ``C Traps and Pitfalls''), but it's still with us in Java, and I assume C++ as well... The following method looks like it should always return the absolute value of n, but every once in a … | |
Hello, this is my first post. I have this homework assignment, and it is completed and it works! my question is just if anyone has any suggestions to clean it up or make it more efficient? I have two seperate files GuessTheNumber.java which is: [CODE]// GuessTheNumber.java //Written by Sean Kelley … | |
I want to write a function to accept a single string that represent a credit card number as parameter and validates it with the format 9999 9999 9999 where 9 is any digit and each quadruplet is separated with a single space. | |
hi there, im very new to programming and i have trouble coding a application that prompts the user for s series of first names and then display the number of names entered and then the name with the most characters in uppercase letters. the application output should look similar to … | |
I cannot figure out why i have this error.It may just be a missing semicolon but i can't find where. Here is my code:(error occurs in many lines, so i can't show where exactly is the problem) /* * To change this template, choose Tools | Templates * and open … |
The End.