32,199 Topics

Member Avatar for
Member Avatar for champion123

How do we compile on top of Java Virtual Machine.Could you guide me on how the JVM works.

Member Avatar for masijade
0
47
Member Avatar for ricedragon

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 …

Member Avatar for harinath_2007
0
233
Member Avatar for yoshio5908

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 …

Member Avatar for zeroliken
0
607
Member Avatar for shiroshiro

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 …

Member Avatar for shiroshiro
0
106
Member Avatar for bops

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for ricedragon

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 …

Member Avatar for ricedragon
0
448
Member Avatar for Narayanan87

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...

Member Avatar for Aviras
0
84
Member Avatar for dsoto

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 …

Member Avatar for dsoto
0
171
Member Avatar for krejar

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 …

Member Avatar for krejar
0
764
Member Avatar for jhamill

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 …

Member Avatar for teo236
0
121
Member Avatar for fender

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(); …

Member Avatar for zeroliken
0
696
Member Avatar for 650U

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]<%= …

0
189
Member Avatar for maverick420

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 …

Member Avatar for stultuske
0
148
Member Avatar for mydreamgirl

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

Member Avatar for NormR1
0
335
Member Avatar for dark_sider_1

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 …

Member Avatar for hfx642
0
276
Member Avatar for asif49

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]; …

Member Avatar for asif49
0
116
Member Avatar for kyriacos1986

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 …

Member Avatar for kyriacos1986
0
440
Member Avatar for P00dle

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 …

Member Avatar for Ezzaral
0
653
Member Avatar for regogo

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 …

Member Avatar for JamesCherrill
0
118
Member Avatar for javausers

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 …

Member Avatar for NormR1
0
229
Member Avatar for sandman64

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 …

Member Avatar for JamesCherrill
0
196
Member Avatar for wannas

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 …

Member Avatar for NormR1
0
200
Member Avatar for riahc3

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 …

Member Avatar for jwenting
0
146
Member Avatar for JavaBiginner

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 …

Member Avatar for peter_budo
0
307
Member Avatar for begueradj

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 …

Member Avatar for JamesCherrill
0
424
Member Avatar for ilovejava

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 …

Member Avatar for stultuske
0
412
Member Avatar for javanewb

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 …

Member Avatar for frank33
0
232
Member Avatar for ougesh

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.

Member Avatar for stultuske
0
172
Member Avatar for begprogram

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 …

Member Avatar for stultuske
0
107
Member Avatar for dimitros

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 …

Member Avatar for stultuske
0
589

The End.