32,204 Topics
| |
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 … | |
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. | |
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 … | |
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 … | |
plz give me one example and how to generate Driver of data base | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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); … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
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? | |
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 = … | |
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 … | |
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..:) | |
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 … | |
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 … | |
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. | |
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(); } } … | |
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..... … | |
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 … | |
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 … | |
[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 < … | |
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 … |
The End.