32,204 Topics

Member Avatar for
Member Avatar for mabrookes

Hi, Im very new to java (about a month) with a useless lecturer who has taught us nothing. Everything I have learnt so far as been on my own at home trying things. I did a question, but I wanted to try adding things to it to learn so started …

Member Avatar for mabrookes
0
104
Member Avatar for jayaj

hi all! pls solve my problem i am using jasperviewer with netbeans , everything is working fine, but when i exit the jasper report my entire project gets exited. Plz tell me the solution. Thanks.

0
39
Member Avatar for dirnthelord

I'm trying to display a report in my src/iReport/report1.jasper directory. but every time i try to display it i get java.lang.NullPointerException. I can't find where the problem is. Please someone just take a look and help me. I have imported all necessary libraries. im using Netbeans. [CODE] package Windows; import …

Member Avatar for dirnthelord
0
673
Member Avatar for spiritsad

Hello How are you? I want to help in a software project? The project that you will be working on in this course is an interactive shopping system. You will be creating the administration part of the system that allows the shop staff to add new categories and products to …

Member Avatar for javaAddict
0
90
Member Avatar for boyz
Member Avatar for peterwalter

Please help me!1 this is what I have so far I am stuck in the plus and both times in the Polynomial class [CODE]public class PolynomialTerm { private int exponent = 0; private int coefficient = 0; public PolynomialTerm(int exp, int coeff) { int[] term = new int [2]; if …

Member Avatar for javaAddict
-1
99
Member Avatar for zenuser

Create an interface class named Dice with one method (public void roll()). Create a class to implement the dice class and call it PairOfDice. The class has two instance variables named dice1 and dice2. Create a method that would determine the value of the dice. how can i create this …

Member Avatar for peter_budo
-1
68
Member Avatar for blazinhieu

I want to double the score if the cards have the same suit or value and if two cards have the same both suit and value, the score get tripled. And the 2 of clubs is a 20 points. i already wrote the basics of the program which it adds …

Member Avatar for vchandra
0
288
Member Avatar for khess

It's true. [URL="http://www.oracle.com"]Oracle[/URL] is now, with its acquisition of Sun Microsystems, the world's largest purveyor of open source software. Does that surprise you? It did me too, until I started digging and realized that Oracle has a history of supporting free and open source software. Their support didn't start with …

Member Avatar for songjie
1
3K
Member Avatar for hongil14

This is a program im writing for class. Here is the exception im getting: Exception in thread "main" java.lang.NullPointerException at LinkedList_final.insert(LinkedList_final.java:72) at LinkedList_final.main(LinkedList_final.java:247) Basically, my program reads a text file and parse a string. And then, add the string to Linked list. Thank you for your time and any help …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for annietabio

package hw3; import java.math.*; public class Main { public static void main(String[] args) { int i, j=0; double t=0; //input int m=4; int n=5; hw3.Point[] p = new Point[m]; hw3.Point[] q = new Point[n]; p[0] = new Point(0,0); p[1] = new Point(0,1); p[2] = new Point(0,3); p[3] = new Point(0,5); …

Member Avatar for annietabio
0
146
Member Avatar for Bobon

Ok guys, firstly i'm sorry for the long code. Don't worry, it is only a small problem related to a small part of the code in the main class. I've highlighted the .area I have a problem here. The first piece of code is my main class. I call a …

Member Avatar for Bobon
0
3K
Member Avatar for Ecliptical210

Hey guys, I'm creating a Maze class along with a client class where it allows the user to input a direction (U/L/R/D), and then the validity of the move will be returned as well as the new position of the maze. So far, I've got this, but when I try …

Member Avatar for rue64ja
0
236
Member Avatar for jeffery12109

please help... here's the code [CODE]import java.awt.FlowLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JPasswordField; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JOptionPane; import javax.swing.JButton; import javax.swing.Icon; import javax.swing.ImageIcon; public class Button extends JFrame{ private JButton reg; private JButton custom; public Button(){ super("BUTTON"); setLayout(new FlowLayout()); reg = new JButton("reg BUTTON"); add(reg); Icon …

Member Avatar for jeffery12109
0
302
Member Avatar for 9w43

I have 2 classes inside bluej, member class and trip class so when I make a member object with student ID, name and course, how can I make an ArrayList or HashSet on trip class which needs to store those students. If you have used bluej you know what I …

Member Avatar for 9w43
0
464
Member Avatar for kevinboey

Just to check with u guys I got a GUI Menu with few selections e.g. "Monkey" , "Elephant", "ViewList", "Exit" . When i click on "Monkey" a JOptionPane Sub-Menu will pop up and i could add or sell . but when i want to go back to the Gui Menu …

0
56
Member Avatar for fishguts

In the code below I am opening a .txt file to count the characters in it. I am assuming that the user does enter a .txt file, but how can I go in checking that the file is truly a .txt. I was thinking of using a java function to …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for Arthas

can somebody tell me the line: [B][U]public static[/U][/B] void main(String[] args) {} especially the highlighted ones in detail. why do we need to use static? public?

Member Avatar for BestJewSinceJC
0
78
Member Avatar for mytime19

Hello everyone, Can anybody tell me how can i pass parameters to a paint method ? I know we can paint on a panel but can anyone provide a good example? Something like this? I know its wrong but please correct me. [CODE] int x=10; int y=120; JPanel p = …

Member Avatar for BestJewSinceJC
0
88
Member Avatar for hockey87

I have to write a program that finds the smallest index of an array and am having a bit of trouble. Can anyone find anything wrong with this? [CODE]import java.util.Scanner; public class SmallestIndex { static final int LINESIZE = 10; static final int MAXSIZE = 50; static final int MINVALUE …

Member Avatar for hockey87
0
157
Member Avatar for jPro

Hi,I am trying to develop an app for android about how to make my app log in a website and retrieve messages,information, friends list..etc If you know how to do it on android or java I will appreciate it..:) Thank you in advance..:)

Member Avatar for Luckychap
0
18
Member Avatar for jonjonjon

Hi I am creating a program that needs to take 10 grades and give you the average, lowest, and highest grades. It needs to use arrays. Have I used arrays or used they correctly so far? Where do I need to put the grades in at? I have written part …

Member Avatar for vchandra
0
97
Member Avatar for jenjenjenjen

Hey I posted earlier a few days ago about a program I am having trouble with. Well I have worked on it but still need a little bit of help. I have to write a program that will store 10 grades into an array. The program will need to output …

Member Avatar for vchandra
0
86
Member Avatar for sneaky667

how abouts do you go passing values from one jframe to another whilst they are both running i have tried defining getters but no luck. if one can post a solution i greatly would appreciate it.

Member Avatar for jwenting
0
26
Member Avatar for kbhargav

the code works but i do not understand the use of editable option whic provides the codes [code]import java.awt.*; import java.awt.event.*; import java.util.*; import java.net.*; import java.io.*; import javax.swing.*; import javax.swing.event.*; public class WebBrowser { public static void main(String [] args) { JFrame frame = new EditorPaneFrame(); frame.show(); } } …

0
30
Member Avatar for TheWhite

When I want to load images, locally, I use use: [CODE=Java]ImageIcon qmarkIcon = new ImageIcon("images/mark.gif");[/CODE] When I run the program through eclipse, everything works fine--all the images load like normal, but when I package the executable .jar and run it in a folder without images/*.gif's, none of the images load..... …

Member Avatar for gsteele
0
9K
Member Avatar for Lokeshmsit

Hi, I have a method in my application called "Save as" which Saves the image of my application on computer my into a file. I used the JFileChooser to let the users choose their desired location for saving the file. The problem is unless user explicitly types in the file …

Member Avatar for peter_budo
0
245
Member Avatar for doha786

hi, here is my program that can read through a txt file line by line to find one word named "friends". if any line contains of this word then get the line and check my precised friend's name is mentioned there or not ? its working when my precised named …

Member Avatar for doha786
0
97
Member Avatar for JellyTurf

[CODE]import java.applet.*; import java.awt.*; import javax.swing.*; public class draw extends Applet { public void delay() { try { Thread.sleep(1); // do nothing for 1000 miliseconds (1 second) } catch(InterruptedException e) { e.printStackTrace(); } } public void paint(Graphics g) { //Timer delay = new Timer() for(int i = 0; i < …

0
83
Member Avatar for simplyflawless

hey everyone, i have to write a method that computes future investment value at a given interest rate for a specified number of years. Write a test program that prompts the user to enter the investment amount, and the interest rate, and prints a table that displays future value for …

0
70

The End.