32,199 Topics

Member Avatar for
Member Avatar for demifuror

Hi guys, At the minute, I'm writing a simple Java application under Lucid Lynx, the latest and greatest Ubuntu release :) Can anyone tell me how to make the windows in my application, match the look and feel of the other windows in the system? I've tried setting the default …

Member Avatar for jwenting
0
247
Member Avatar for .11

I am working on an phone book class, and I have to have the Phone numbers, which have a name and address in an order list(linked). But I have to sort by phone nnumber, not by name...I have been trying to think of ways to sort the phone numbers. So …

Member Avatar for bigdognec
0
753
Member Avatar for socal

Okay I'm a beginner programmer and I just can't seem to get the most basic class and constructor to work. Heres what I have [CODE]import java.io.*; public class bankAccount { //instance variables String name; int number; double balance; } public bankAccount(String name, int number, double balance) { name = "John …

Member Avatar for masijade
0
68
Member Avatar for ChPravin

Hello All, I am getting the following error message when I try to execute my program as an executable jar on a remote system.The same program works perfectly fine on my local system: Exception in thread "main" java.sql.SQLException: Operation not allowed after ResultSet closed at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) …

Member Avatar for masijade
0
936
Member Avatar for white feather

[CODE] public void setTableModel(List<Users> users) { eraseTableRows(); for (int i = 0; i < users.size(); i++) { Users u = users.get(i); tm.insertRow(i, new Object[] { stuff }); } } private void eraseTableRows() { for (int i = 0; i > tm.getRowCount(); i++) { tm.removeRow(i); } [/CODE] i've tried this and …

Member Avatar for white feather
0
143
Member Avatar for didi00

Hi everyone! So I have a problem with java applet. [code] import java.awt.*; import java.applet.*; // import an extra class for the ActionListener import java.awt.event.*; // Tells the applet you will be using the ActionListener methods. public class project extends Applet implements ActionListener { TextField nameField; Checkbox cb1; Checkbox cb2; …

Member Avatar for didi00
0
155
Member Avatar for tsili

hi!!i'm new in java programming and i have a project in which i use regex and xml input and output!my project is about gathering information about weather predictions in weather forecasts for some cities!my problem is that i'm new in java programming and i have problem making this project to …

0
31
Member Avatar for idlackage

Is it possible? I want my components to look separated--properly so, with distinguishing border colours, not just with hgaps and vgaps. Is there a way to emulate it? I tried setting a panel background to black, then using hgaps and vgaps in hopes that the black would show through the …

Member Avatar for sfrider0
0
69
Member Avatar for msi_333

hello all , If i have a static reference to object as a class member . and this object is a scheduler that contain ( Jobs , and triggers ) . is there any way to make this object lives even after my function call ends .

Member Avatar for msi_333
0
84
Member Avatar for heiro

Here is my code so far: [CODE] import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; import javax.swing.*; public class Paint extends JFrame { private static PCanvas canvas = new PCanvas(); public Paint() { // Create a panel to group three buttons JPanel p1 = new JPanel(new GridLayout (1, …

Member Avatar for sfrider0
0
3K
Member Avatar for jiraiya

Hi everyone, I'm trying to build a GUI for a project I'm working on, and I'm having trouble working out how to move between different displays within the same GUI. I have a simple GUI with a menu bar and two buttons in the content pane. If the user clicks …

Member Avatar for jiraiya
0
68
Member Avatar for jakx12

Ok so i need to be able to clone objects with two arraylists of the same object. Thus when i try and clone recursion occurs. I need to clone the objects because I have to be able to have a list divided up into tabs and have it ordered into …

0
56
Member Avatar for iamthwee

I don't know if this is helpful for moderators but I've put together a code formatter in dotnet which automatically beautifies someone's code. Numerous times you will see newbies posting without code tags. Now the moderators can easily quote the post so the indentation is preserved, but sometimes the posters …

Member Avatar for iamthwee
3
230
Member Avatar for redZERO

Hey guys This is more of a question of how people generally do things. Often in programs involving a GUI, I need to have more than one logical 'screen', for example if you were filling in a form, you would click "Next" and the next 'screen' would appear showing completely …

Member Avatar for tizon
0
136
Member Avatar for kbar

Hi, I'm trying to find the number abcd such that a^b + c^d = abcd however, I'm running the code fine, but it's going to my second if statement, the one that's supposed to tell me that there's no solution. Am I doing something wrong or is there truly no …

Member Avatar for kbar
0
94
Member Avatar for Java1990

Hi I'm i beginner in java :$ and i have a problem .... with the code they want from me to write a program that reads and prints the number of occurrence of each alphabetical letter in the string . the program should call a method to creat an array …

Member Avatar for Java1990
0
203
Member Avatar for tizon

Hi guys, Need help with my project it is an offline personal dairy so i have to display calendar i did but the problem is it doesn't look like a calender at all it's just look like an collection of buttons i tried to set border as setBorder(1,1,1,1) but that …

Member Avatar for tizon
0
95
Member Avatar for dkalita

Hi Can anyone help me in suggesting how to prevent "out of memory" exception in java. I am getting this exception when I load a very large data in my application and after running the application for sometime the application throws this exception. I want to know if there is …

Member Avatar for peter_budo
-1
128
Member Avatar for ceyesuma

Would it be safe to assume that if I had a synchronized DAO for each model that implements an interface too each with access to XML resources. So when my JDesktopPnane builds each JTabbedPane with the corresponding view GUI panel that I could have the code in the in each …

Member Avatar for ceyesuma
0
100
Member Avatar for kizito106

Am new to java.How can I solve this small problem? Am using database based authentication to enable mi logon.Am trying to compare the username and passfield fields but I dont know the best conditional operator/logic operator to use. Here is my sample code that contains a red wavy underline in …

Member Avatar for jwenting
0
134
Member Avatar for anuplike

[code]<%@ page language="java" import="java.util.Properties,javax.mail.*,javax.mail.internet.InternetAddress,javax.mail.internet.MimeMessage" %> <% public class SendAttachment { public static void main(String args[]) throws Exception { String host = "smtp.gmail.com"; String from = "123.digit@gmail.com"; String to = "ae@gmail.com"; // Get system properties Properties properties = System.getProperties(); // Setup mail server properties.setProperty("mail.smtp.host", host); // Get the default Session object. …

Member Avatar for jwenting
-1
89
Member Avatar for mvsraman

I use Session Class in javax.mail....but, im getting error duplicate as :- Duplicate local variable session, as HttpSession it uses. So please tell me how to use Session Class in jsp.

Member Avatar for jwenting
0
113
Member Avatar for coding101

Im learning java, and having trouble with some simple code. Heres my code, can you tell me why the output is disregarding the "Correct!" statement at the end package Otm; import java.util.*; public class Otm { public static void main(String arg[]) { Scanner sc=new Scanner(System.in); String Wash="Washington"; String Ham="Hamilton"; String …

Member Avatar for coding101
0
114
Member Avatar for yasaswyg

Hi, I've been having trouble understanding this code that my professor put on the web. Can someone help me understand this. I thought this would compile and run but its giving me an error message " Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at fileio.AllCapsDemo.main(AllCapsDemo.java:64) " Im not sure how i …

Member Avatar for sergb
0
149
Member Avatar for alvarog9

Does anybody have the source code of the Game of Life in Java?? Im very interested in it. If you have it, post it here o send me an email =) Thank you!!

Member Avatar for POTUS270
-3
169
Member Avatar for Bladtman242

Hi guys :) Well I got an "variable might not have been initialized" error when I tried to compile the following code: [CODE=java]import java.lang.*; public class NewFrame { public static void main(String[] args) { if (args.length != 3) { System.out.println("Usage: java NewFrame <frame-name> <frame-hight> <frame-width>"); System.exit(1); } int firstArg, secondArg; …

Member Avatar for Bladtman242
0
506
Member Avatar for StorLiten

Background: I have two lists: one list (list) contains elements of AnyType and one list (index) contains integers. The integers (in index) are sorted in ascending order! Mission: To print out the elements in list 'list' @ index given by list 'index'. Example: list = {I, really, love, to, hate, …

Member Avatar for SasseMan
0
120
Member Avatar for kesh1000

hi everyone. my issue is that when creating a prepared statement if i create a delete statement with a variable the code doesnt excute but instead if i provide it with a string it works fine. whats the problem. this code doesnt seem to work [CODE] public void delCustomer(String id) …

Member Avatar for SasseMan
0
94
Member Avatar for kesh1000

hi everyone. can any of you guide me asto how to avoid null pointer exception in the result set variable.i am using this function to get all data in mysql table in hashtable. how to i take the scenario if there was no data in the table at time of …

Member Avatar for kesh1000
0
323
Member Avatar for PSU92

I have been working on this for days!! I dont want to allow negative numbers in my program. I have changed it so many times I cant stand to look at it anymore. I greatly appreciate any help even just an example of what I need to do. I will …

Member Avatar for SasseMan
0
134

The End.