31,001 Topics
| |
1st class public class Student { private String name; private double id, examMark, courseMark, totalMark,grade; Student(String name,double id,double examMark,double courseMark){ this.name=name; this.id=id; this.examMark=examMark; this.courseMark=courseMark; this.totalMark=getMark(getExammark(),getCoursemark()); this.grade=grade; } public String getName()// to return name of student { return name; } public double getID()//to return id of the student { return id; … | |
Hi gentles! jest i am creating one stand aloe application by using JDK-1.6 Netbeans.7 Mysql i can run in net beans well and the database also working well with this, if i "clean and build" the project as jar file it working well in it's specific location (eg:D:\Raj\Gui\WorkersData\dist) But! if … | |
| Is there any free CRC Cards generator? I found just for UML but nothing on CRC Cards? Thanks |
Hi My reqvirements are as below Input is the address of a folder containing images Output should be a jframe displying first image in a folder when i scroll mouse or press right arrow key then next image should be displayed Similary when i scroll back or press left key … | |
Any About this error run: Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: (class: stockinventoryforecast/productEntries, method: <init> signature: (Ljava/sql/Connection;)V) Constructor must call super() or this() at stockinventoryforecast.mainPage.actionPerformed(mainPage.java:226) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6504) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6269) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4860) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4686) … | |
Hi My reqvirements are as below Input is the address of a folder containing images Output should be a jframe displying first image in a folder when i scroll mouse or press right arrow key then next image should be displayed Similary when i scroll back or press left key … | |
Hello, I am rather new to this so bare with me! I am currenlty creating a BlackJack game in Java and attempting to use the MVC design when creating it. I have so far created the following classes: - Card: To hold create a card - Deck: To create a … | |
Hi all, I have given a assignment to implement patterm matching algorithms and to do a experimental analysis on number of comparisons, real time taken and CPU time taken for each algorithm. I have done all except CPU time calculation. Plz can anyone guide me how to do this... | |
I'm working on a program that demonstrates polymorphism. It asks the user to create an elementary, high school, or college student. Once a student is created, it is stored in an array list. When prompted, the program is suppose to print out each of the student's information. How do I … | |
Hi! I have several 55 x 55 px png-pictures, which need to be rotated by 0, 90, 180 or 270°. I tried the following but in that cases the pictures were not on their correct positions anymore. Thanks. // Import the basic graphics classes. import java.awt.*; import javax.swing.*; /** * … | |
This basic client server program compiles fine in eclipse IDE but I keep getting a zero back from server!!! I'm new to all this client server stuff by the way. package echo3; import java.io.*; import java.net.*; class Client { public static void main(String argv[]) throws Exception { int outgoingdata = … | |
have various classes representing various types of program-genres (comedy, drama etc). I have a text file filled with '-' seperated values that get read by a class called Processing and puts them into a LinkedList. I have another class GUI_g that creates the GUI. It has 3 JTables. One for … | |
Hey Guys, I am working on a gui and I've got a two part question. I've got a jlist and a couple of buttons to add and remove components from the list. I've got everything working except for the keyListener. When the cursor is on the jList (hasFocus I assume?) … | |
Hi folks.. I'm in search of desktop nofication api's apart from the basic(default) one that java already provides. Can anyone direct me to some good links . Its better if it is free of cost. I found [this](http://blog.swingfx.ch/twinkle-100) nice one but its not free. | |
| I have this block of code below which is to control questions which are to be displayed from the array. I am having problem with the the 3rd line of code, an i am not entirely sure what the problem is. rnd1, rnd2 are both double. Eclipse is telling me … |
Okay, so I have a text file like this: I Did It Your Way, 11.95 The History of Scotland, 14.50 Learn Calculus in One Day, 29.95 Feel the Stress, 18.50 Great Poems, 12.95 Europe on a Shoestring, 10.95 The Life of Mozart, 14.50 And, as you can see, there are … | |
My program won't run.. I keep getting a nullPointerException but I have no idea why.. Thanks! The program is supposed to create a simulation for a line ---------------------------------------------------------------------------- public class Prog5 { /** * @param args */ public static void main(String[] args) { Simulation simulation = new Simulation(10); simulation.run(); } … | |
class P3 { public static void main (String[] args) { makeP3Picture(); } public static Picture makeP3Picture(Picture source) { String fileName = FileChooser.pickAFile(); String sourceFile = FileChooser.getMediaPath("butterfly1.jpg"); Picture sourcePicture = new Picture(fileName); Picture targetPicture = new Picture(source.getWidth()*3, source.getHeight()*2); source.explore(); source.copyPhoto(); source.show(); return sourcePicture; } } im getting the error: "makeP3Picture(Picture) in … | |
#//Here is my simple class for MyCar# public class MyCar { private int odometer; private int speed; private int gear; public MyCar() //send values to member variables in this default constructor { odometer = 0; speed = 0; gear = 0.0; } public MyCar(int od, int sp, int gr) //constructor … | |
| [Link Anchor Text](http://oi44.tinypic.com/bwfaf.jpg) Hey dudes! I'm pretty crummy with Java layouts, so I was wondering if anyone had time to help me. The rather crude drawing I made is the layout I had in mind. I wanted 3 rows, with 1 gridlayout on the top and bottom, and in the … |
Will someone please tell me why I keep getting my custom file not found exception? The file is spelled correctly and is in the same directory of my java file. I am programming on Eclipse on Mac OS X. Here is my source: // Dillon Sheffield // Lab 10a // … | |
I'm currently writing a program where the program reads in words from a .txt file and stores the data into an array. The user then has the ability to enter in entries into array and the program then writes everything to the txt file where it can be read again. … | |
Hello, How can I get a bigger textfield? What I mean is: Let's say that I'm going to register a bunch of cars in a program I made. I want to register things like name, model, when it's made etc + description. I can make simple JTextFields for most of … | |
IF someone can write this code out for me so i can use it as an example for the rest of my problems and question i have to do I would really appreciate it alot. and no this question is not Homework what so ever I am a visual person … | |
I have a GUI in which has a container for a JTable called 'listTable'. I want to populate the JTable with data stored in a linked list, using the AbstractTableModel. Basically, I have a LinkedList stored in Processing.java. It contains all the data retrieved from a text file. I created … | |
I have a problem with netbeans.... Already I installed MySql. but in netbeans Services panal not mention anything about databases.. If I right click on their its not mention anything.. I want to add database through that. So how I can do it. What are the pre-Requirement to do this(Any … | |
Would anyone happen to know also if there is some predefined swing box for prompting the user to decided whether or not to overwrite an exhisting file? you know the basic "This file already exists, would you like to overwrite it?" | |
In a nutshell i'm working with a program that uses JSCH and xstream to zip a file, and send it to a remote linux server. I'm using static folders, but when i send a file with the same name as one in the folder it will overwrite the exhisting file. … | |
Hi forum, I just need a little help on one thing, how can I import this text document and make it usable in a JList object for my GUI application? I Did It Your Way, 11.95 The History of Scotland, 14.50 Learn Calculus in One Day, 29.95 Feel the Stress, … | |
Hey, so this is my final java assignment for 1st year comp sci program. I really want to get a decent mark before exams, so please I need your help. I've been working on it hard, but this assignment is making me feel dumb :( I'm supposed to make an … |
The End.