32,199 Topics
| |
new to I.T. need help about the problem analysis ,algorithm design, formatting the output package gasolinestation; import javax.swing.JOptionPane; public class GasolineStation { public static void main(String[] args) { float total, money; String yesno; JOptionPane.showMessageDialog(null, "Welcome to Gasoline Station!"); do { String select = JOptionPane.showInputDialog(null, "1 = Diesel .................... $ 39.00\n" … | |
Just a quick heads-up, especially for anyone using Java in their web browser. There's a "widely exploited" vulnerability in Java that could allow bypassing normal security when a Java applet is run silently upon visiting a web site. (ie It's a bad one). Users are being widely advised to disable … | |
Hello if anyone can help I would like to know why I get this error when executing.. exception in thread "main" java.lang.NuSuchMethodError: main [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class GridLayoutFrame extends JPanel { // These are the components private JButton FindB,AddB,RemoveB; private JLabel theOne,theTwo,theThree,theFour,studentID,theMidTerm,theMidterm,theFinal1,theFinal2,FinalG1,FinalG2,FGrade2; private JList studentNumbers; … | |
Hi there everyone, I have a bit of a problem I am hoping you can help with. This is for an assignment, and I know I can finish the final calculations for my tax program if I could just pass my 2 variables from previous methods into the final method … | |
Hi everbody, Seen posts saying simple dictionary in Java. Thought of sharing something may be useful for others. Here is a simple code if anyone interested. import java.util.*; public class Dictionary { public static void main(String[] args) { Map <String, String> dictionary; dictionary = new TreeMap <String , String>(); Scanner … | |
Hello, I was trying to make a client-server application using java orb. Server was fetching data from database and passing them to client. The client was getting an exception for large numbers of rows (say, 50K). Jan 15, 2013 11:48:51 AM com.sun.corba.se.impl.transport.SocketOrChannelConnecti onImpl readFully WARNING: "IOP00410215: (COMM_FAILURE) Read of full … | |
Hello I am a student of computer science year 3 and am doing my project on a **road design simulator**. I should be able to design a road on a java interface and simulate it with cars. Does anyone have an idea about how should i proceed with it? | |
write a program to print the highest palindrome value that is the multiplication of two numbers lies between 100 to 1000. | |
I'm supposed to write an application that calculates the Body Mass Index (BMI) for the user, using centimeters for height, and kilograms for weight.. Basically, I'm stuck here.. I have no clue what I'm supposed to do next.. Or if it's even correct so far.. Any help? /*** This application … | |
This is the code which i wrote.But when i input a word,it should search it and give the definition.I think there is a problem in while loop.But i can't solve it.Can u guys,plz check it? [CODE]import java.util.*; class dictionary { public static void main(String args[]) { Hashtable dict = new … | |
Hi everybody, Just wondering if it is possible t hat we can change the text size in balloon or bubble message or whatever you call it the one we create useing "trayicon.displaymessage("message", "message", message.info);Highly appreciate if someone could help me out. Thanks. | |
PROBEMS: > The Library class would include data members such as ID, Date of acquisition, description, number of copies, title and **instance methods such addItem() and retrieveItem()** also accessor and mutator methods are needed to accecss data members. > User arrays to store library holdings. So here's my questions: **What … | |
Hi, I am new to Java. Recently I developed one application for Uploading files to Shared drive. All files are Uploading properly but Checksum Of PDF files are mismatching. Someone please help me to fix this issue Thanks in advance. | |
hi i need the code to calculate the euclidean distance by reading a yeast dataset file when the calcute button is clicked it show the distance between different points in another frame | |
This is my Problem, Please Help me :( The Library class would include data members such as ID, Date of Aquisition, descrition, number of copies, title and instance method such addItem() and retrieceItem() also accessor and mutator method aree needed to access data members. These are variables and methods common … | |
This is a part of my code. String name=sc.nextLine(); int no=sc.nextInt(); The problem is if I write sc.next() instead of sc.nextLine() then i can pass only "james" not "james watson". when i write sc.nextLine() then it takes integer not string.Why is it so? Please Help!!! | |
hi i need to create a batch file when it is double click it should run the code | |
having a little trouble trying to convert this pseudo code into python, could any help receiveFile () { lastblock := 0 newblock := 0 ; repeat repeat event := getFrameFromUDP(m) ; case event of data : newblock := getBlockNoFromFrame(m) ; transmitAckOverUDP(newblock) | timeout: transmitAckOverUDP(lastblock) esac until newblock==lastblock+1 ; lastblock = … | |
/ // Clipper.java // // /** * Object for performing clipping * */ public class clipper { /** * clipPolygon * * Clip the polygon with vertex count in and vertices inx/iny * against the rectangular clipping region specified by lower-left corner * (x0,y0) and upper-right corner (x1,y1). The resulting … | |
Hello, Iv recently just started using javafx and i am struggling finding a way to access data from a controller class, at the moment i can do it using method.invoke, however it seems like more of a hack than a legitimate clean option of accessing data from a controller class. … | |
Hello I'm planning to create a java application which calculates ip address just like this http://jodies.de/ipcalc?host=172.168.0.2&mask1=23&mask2= can you suggest an existing library, or tutorials so I could begin developing this? | |
| |
Hello I'm currently working with my Java program here is my code: import java.util.Scanner; public class StringAct{ public static void main(String[]args){ Scanner inp=new Scanner(System.in); System.out.print("Enter string: "); String a= inp.nextLine(); if(a=="angel"){ System.out.print("Valid"); } else{ System.out.print("Not Valid"); } } } this program asks the user to enter a string, the string … | |
HI! I want to write a constructor that will make a window (a frame). I want to be able to insert the height, width, position and window color. This is what I've written: public Window(String name, int height, int width,String c,String isActive,int PointX, int PointY){ setTitle(name); setSize(height,width); getContentPane().setBackground(Color.c); setLocation(PointX,PointY); setVisible(isActive.equals("active")); … | |
Hi there everyone, I am a novice at java and this one has me stumped. This is the beginning of a tax calculator but I am getting irregular output from the getIncome() method. It starts fine, letting the user enter income figures, but on the third income entry or so, … | |
I am a newcommer to java programming. i wrote this which compiles without error. when i put an int value like "5" it runs without any problem but when i puts a double value like "5.1" i get error. What is the problem? package javaapplication1; import java.util.Scanner; // Scanner is … | |
Hello I am looking to make an application that performs basic data analysis techniques. I want to read and write into excel files, any pointers will be much appreciated! thanks! | |
Hi, I am working on a java web application using Spring MVC framework. The application is running fine. I am writing some JUnit test cases for some of the pojo classes inside the webapp. I created a separate source folder 'test' which is in parallel to the src folder. I … | |
This is probably a rather simple problem, I haven't looked at any Java in some time and am having trouble with this. First off, here is my program: it's very simple, because I cant even get past here without getting several errors. On Line 6, it says "unreported exception FileNotFoundException; … | |
I was working on a project on netbeans and came across a problem with netbeans. The netbeans was showing the error repeatedly as "duplicate class". eventhough there is no duplicate class in the project. After so much frustation , i realized that this is netbeans bug. After doing some search … |
The End.