32,199 Topics
| |
Hi, I made two classes in Bluej, in the first class I have constructed a window and the other class is a form where data can be inputted. How can I put the form in the window and make the window visible. Is this possible or do I have to … | |
Hi! My question is how could I add the checkbox column to my table. Well, I've tried the following solution, however it provides error message (null), if the table field is empty: [CODE] tableModel = new QueryTableModel(); tableAttributesFormTypes = new JTable(); tableAttributesFormTypes.setModel(tableModel); tableModel.setQuery("select at_code, at_title, at_type from Attributes"); class QueryTableModel … | |
I am using JFrame for my GUI and I want to be able to select a row of text of a bunch of rows of text, one at a time. Like in Microsoft Outlook, you select an email and it selects the whole line for you of all the different … | |
It shows null pointer exception in Driver class, can anybody find me the error ?? [CODE]public class Node { int iData; double dData; Node leftChild; Node rightChild; public void displayNode(){ System.out.println(dData); } }[/CODE] [CODE]public class Tree { private Node root; //the root of the tree public Node find(int key) // … | |
hello, i have tow JApplet form (NewApplet1,NewApplet2) , i want to how NewApplet2 when i press button on NewApplet1. so is there any solution ? i am using NetBeans IDE thanks | |
I'm an intermediate c++ programmer beginning to learn java and curious about what people would reccomend on how to approach network programming with java. I have no desire to build webpages for browsers but to build a communications between systems to exchange data for games or other programs I might … | |
Hey guys, i'm fairly new here. Just stuck on a program. It seems like it should be right, based on my pseudo code, but something went wrong. Edit: without using Math.pow; Edit: kind of not looking for the answer, just what i did wrong,, other wise, i wont know it … | |
I'm working on an a grading program that will require the use of a couple classes. The program contains a list of "program assignments" which there are 5, and 3 test scores. The Driver class contains the scores for the students. I'm stuck writing the average methods :$ Along with … | |
[CODE] public class Node { int iData; double dData; Node leftChild; Node rightChild; public void displayNode(){ System.out.println(dData); } } [/CODE] [CODE]public class Tree { private Node root; //the root of the tree public Node find(int key) // find node with given key { // (assumes non-empty tree) Node current = … | |
I have just started taking Java as a course in college and I am having a problem understanding how to find the syntax errors in a definition for a class.I am not asking for answers I just need help understanding it more. The class is public class AA { private … | |
Please help me this question is givin me so much stress. This program is for you to get familiar with file IOs in Java as well as writing methods. Write a program that asks the user for a file name that contains a line delimited records of student applications. Each … | |
| Hi, Does anyone know where I can read about ways to protect a website from potential threats? i.e. SQL Injection, etc. In particular, a website using HTML/JSP/Servlets/Java/Tomcat. Thanks, Ashton. |
[COLOR="Red"]hey,i'm having trouble with this code...it keeps saying there is an error..can you help me please...thank you in advance[/COLOR] cannot find symbol symbol: constructor CompteBancaire() location: class javaapplication18.compteBancaire this is the class: [CODE] package javaapplication18; import javax.swing.*; import java.util.Scanner; public class CompteBancaire { private String nom,prenom,typecompte,currency; private int numerocompte; private … | |
pls,i need help in inserting a date from a text field using java, to mssql database. i am getting incorrect date for example when i insert 13/3/2010,i am getting the date 1/3/2011.i want a solution,i've searched a lot but useless. the code is: [CODE] try{ java.util.Date d; String s; d … | |
I write some coding i want to get 2 output like Example (1) of object Employee:  Id#  Name :  Age:  Sex:  etc. Example (2) of object Employee:  Id#  Name :  Age:  Sex:  etc. i just dont want a long code.. … | |
It might be quite newbie question but i've been through my books and searched online; yet still didn't find any answers. I have a couple of classes with methods in them. In my main : [CODE] public class main { public static void main(String fileslist[]) { new Folder(); Search SearchFiles … | |
If I already have a JListBox set up, but the text is too small, how do I make the font of the elements larger? | |
how to call array in main class from its derived class with its object | |
I have this method to see whether not the year is a leap year or not. heres the code i get the error missing return statement at the end. What can i do , i can't add return true or return false, becuase that screws it up. public boolean isLeapYear() … | |
i have been in a java course it´s kinda expensive but anyways i am thinking that im going to quit cause its not hard but its really overwhelming dont you get that feeling?, theres just to much to learn!, i cant believe people learned more than 1 programming language also … | |
[CODE]import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.io.*; import java.sql.*; class MyCanvas extends Canvas { Image img; public MyCanvas(Image img) { this.img = img; } public void paint (Graphics g) { if (img != null) { g.drawImage(img, 0, 0, 1000, 1000, this); } } public void setImage (Image img) { … | |
hi... can anybody tell me how to see the codes behind a java game on a web page?? thanks.. | |
hi everyone this is my code. [CODE] public class Qustion3B{ public static void main (String args[]){ double sinx = Math.sin(0.5236); double cosx = Math.cos(0.5236); sinx = Math.pow(0.5236,2); cosx = Math.pow(0.5236,2); double sum=sinx+cosx; System.out.println("sine: " + sinx+"cosine: " + cosx +"sum: " + sum ); } }[/CODE] it continue to show … | |
Ok for my uni project im wondering if its possible to make a simple game where by the user must click a button ten times to win. the button has to move after every click to a random point on the screen. Does anyone know if there are any tutorials … | |
If anyone could explain how to design an applet code for a simple house, then modify it. I wil give details if anyone can help. | |
Can anyone explain to me in simple English language why we can't use assertion for: 1) Argument checking in public methods. [CODE] public class Test{ public void abc(int a){ assert a>3 } } [/CODE] 2) Command line arguments. [CODE] public class Test{ public static void main(String[] args) assert args.length==3 } … | |
Helooo, Attached is a pic of my main screen of my program. Basicly it's a phone book app similiar to one you'd have on your phone. The thing that I can't wrap my mind around, is that you see the nice big textArea there? After you've added a contact now. … | |
Hi, I am getting this error for my codes: Exception in thread "main" java.lang.NumberFormatException: For input string: "{ 1.0, 2.0, 3.0, 4.0, 5.0, 1.0, 2.0, 3.0, 4.0, 5.0, 1.0, 2.0, 3.0, 4.0, 5.0, 1.0, 2.0, 3.0, 4.0, 5.0, 1.0, 2.0, 3.0, 4.0, 5.0, 1.0, 2.0, 3.0, 4.0, 5.0}," at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) … | |
When I run this loading bar script the bar doesn't load and then it loads to the maximum. how come this load bar doesn't work thanks for the help. [code] // The "LoadBar" class. import java.awt.*; import hsa.Console; public class LoadBar { static Console c; // The output console public … |
The End.