32,199 Topics

Member Avatar for
Member Avatar for someone5

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 …

Member Avatar for someone5
0
1K
Member Avatar for tobine
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
565
Member Avatar for musikluver4

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for javanew

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) // …

Member Avatar for JamesCherrill
0
124
Member Avatar for dnweb_jn

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

Member Avatar for dnweb_jn
0
22
Member Avatar for ChaseRLewis

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 …

Member Avatar for JamesCherrill
0
78
Member Avatar for AnAnonymousUser

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 …

Member Avatar for ChaseRLewis
0
88
Member Avatar for ssmokincamaro

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 …

Member Avatar for ssmokincamaro
0
166
Member Avatar for javanew

[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 = …

Member Avatar for javanew
0
145
Member Avatar for gigimariah

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 …

Member Avatar for javanew
0
91
Member Avatar for usccapo

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 …

Member Avatar for peter_budo
-1
132
Member Avatar for feoperro

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.

Member Avatar for peter_budo
0
2K
Member Avatar for caro11

[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 …

Member Avatar for caro11
0
125
Member Avatar for khaled_jawaher

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 …

Member Avatar for kramerd
0
2K
Member Avatar for wow.lk

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.. …

Member Avatar for tenorsax08
0
152
Member Avatar for hatux

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 …

Member Avatar for cale.macdonald
0
84
Member Avatar for FALL3N

If I already have a JListBox set up, but the text is too small, how do I make the font of the elements larger?

Member Avatar for fdevanand@gmail
0
217
Member Avatar for sajidshamshad
Member Avatar for vikas.kethineed

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() …

Member Avatar for kramerd
0
226
Member Avatar for rayden150

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 …

Member Avatar for ceyesuma
0
159
Member Avatar for Nidhi S.

[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) { …

Member Avatar for Nidhi S.
0
1K
Member Avatar for hateme_devon
Member Avatar for masijade
0
245
Member Avatar for girl.java

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 …

Member Avatar for sharathg.satya
0
139
Member Avatar for jamesyrawr

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 …

Member Avatar for sharathg.satya
0
135
Member Avatar for cassandracritch

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.

Member Avatar for nihal_kiss
0
77
Member Avatar for solomon_13000

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 } …

Member Avatar for solomon_13000
0
89
Member Avatar for Dean_Grobler

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. …

Member Avatar for masijade
0
171
Member Avatar for Sunshineserene

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) …

Member Avatar for Sunshineserene
0
2K
Member Avatar for sirlink99

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 …

Member Avatar for sirlink99
0
163

The End.