35,618 Topics

Member Avatar for
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
159
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
33
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
70
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
86
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
72
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
57
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
237
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
138
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
96
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
204
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
99
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
130
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
103
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
139
Member Avatar for MichaelMelamud

Hello I have a jsp document,and a java class with some functions,i want that a button that located in the jsp document,will execute a function from the java call on click. but i don't really know how to do it,and i am stuck on it for a week now. If …

Member Avatar for javaAddict
0
8K
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
91
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
117
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
117
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
171
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
507
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
123
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
95
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
337
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
139
Member Avatar for Guru.M

hai have designed calc application but iam not geting how to get the clicked number shoud present in the text field how to do arithmetic operation iam beginer of java please can help

Member Avatar for Madawar
0
75
Member Avatar for zigana91

I'm working on trying to fix the errors that I have in my coding. The first error I am having is with the import lines i.e., import dot java dot text dot asterisk semicolon The message I am getting is <identifier> expected. What do they mean? I am very new …

Member Avatar for naziatarannum
0
98
Member Avatar for karanits

Well . this is fairly a simple question. Lets say i have a registration form, some user has registered and i have the details in my database. Now i can use the same form for letting the user edit his profile. I can prefill the textboxes by giving the following …

Member Avatar for karanits
0
134
Member Avatar for Guru.M
Member Avatar for jwenting
0
21

The End.