35,618 Topics

Member Avatar for
Member Avatar for Shizuo

Heres my code [CODE]import java.applet.Applet; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Order extends Applet implements ActionListener { String password = "pword"; TextField txt1 = new TextField(10); TextField txt2 = new TextField(10); Button btn1 = new Button("Ok"); Button btn2 = new Button("Ok"); Label lbl1 = new Label("Choose Your Order"); …

Member Avatar for JamesCherrill
0
452
Member Avatar for bibiki

hey there, in a project I am involved, someone put a test class in main code. eclipse would not find the bug but mvn, not that in eclipse, would report a compile error, and we found the bug. because of that, I wanted to build my new maven project without …

Member Avatar for peter_budo
0
171
Member Avatar for untio

Hi, First, thanks for reading this stuff. I am learning java. I recognize that I am a beginner. Last weekend I have coded a clock. Sourcecode is: import javax.swing.JFrame; import java.util.GregorianCalendar; import java.awt.image.BufferedImage; import java.awt.Canvas; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Color; import java.util.TimerTask; import java.util.Timer; import java.awt.BasicStroke; public …

Member Avatar for untio
0
215
Member Avatar for fmasroor

How can I get the mouse position even when an event hasn't been performed, eg. I haven't clicked or left window, etc. Kind of like mousing over something. I am currently using a class that implements MouseListener, MouseMotionListener for events such as clicking and releasing but I would like a …

Member Avatar for JamesCherrill
0
208
Member Avatar for CrAzY347

First thing i want to say is i am sorry if this is not the appropriate place to post this. I am basically looking for an open source project to work on. I honestly have no idea how to find one or how to become a part of one. I …

Member Avatar for pritaeas
0
200
Member Avatar for mesbahuk

For my **Java to C#** conversion project, I need to use something equivalent to Java's `Calender` class. I have some codes like: Calender cal = Calender.getInstance(); long time = Calendar.getInstance().getTime().getTime(); long time2 = System.currentTimeMillis(); which returns some random values at different times. I have come to know C-sharp's `DateTime` is …

Member Avatar for ddanbe
0
988
Member Avatar for murali2489

Hi All, Im still finding it hard to understand Paint method, Almost all websites i had gone thru, they are showing examples of how to use it in an applet. I just cant understand on how to use it in a GUI application by extending Jframe object. Here is one …

Member Avatar for murali2489
0
1K
Member Avatar for pmark019
Member Avatar for Ne0nx3r0
0
755
Member Avatar for vinnitro

This is my ScreenManager class which is used for getting the perfect DisplayMode & setting the screen to fullscreen import java.awt.*; import java.awt.image.BufferStrategy; import java.awt.image.BufferedImage; import java.lang.reflect.InvocationTargetException; import javax.swing.JFrame; public class ScreenManager { private GraphicsDevice vc; //give vc access to monitor screen public ScreenManager() { GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment(); vc …

Member Avatar for vinnitro
0
281
Member Avatar for <M/>

I have a project and I don't understand what the instructions want me to do. Can someone explain them better...? I don't understand constructors, objects, and methods very well but I am trying my best to do this project (i am a bit amazed how i got the highest grade …

Member Avatar for rubberman
1
310
Member Avatar for newbie14

Hi All,We have a java application which does deal with lots of insert,update and select statement.We are using bonecp. So we took some sample heap and analyse it with MAT and its pointing to jdbc leaking. Thus we went into the codes and ensure that all resultset,statement and connection are …

Member Avatar for newbie14
0
945
Member Avatar for pradap.adwani

For me getting same result (all the text box are null value is filled) after move the textboxes after calling request.getParameter() also... What i need to change it? Where i need to edit? # **First Jsp Page** # <%@ page import="java.sql.*" %> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");%> <HTML> <HEAD> <TITLE>Fetching Data From a …

Member Avatar for peter_budo
0
2K
Member Avatar for mikewyatt

I have a jtable and inside this table is a column of checkboxes (other info on following columns). if the user clicks on the checkbox to change it, which it does, there is a popup that comes up for an administers password approval... got that. If the approval is accepted, …

Member Avatar for ageshyaw
0
2K
Member Avatar for christine.dunne.963

I tried using BorderLayout as in label but does not work package HelloWorldGUI; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class HelloWorldGui { private JFrame a; private JPanel p; private JButton b1; private JLabel lab; public HelloWorldGui() { gui(); } public void gui() { a = new JFrame("window"); a.setVisible(true); a.setSize …

Member Avatar for scudzilla
0
124
Member Avatar for murali2489

Hi All, I have a doubt in paint method of the Component Class. I know how to use that in Applet but im finding it hard to use it in GUI app. Im posting my code here, please edit it to make the program use paint method to render any …

Member Avatar for JamesCherrill
0
337
Member Avatar for JoeD1

I created a String[][] grades, who's size is set by number of students User enters. The array is then populated with my first for loop, and the next for loop is supposed to print out each students date line by line. If I only enter 1 Student and fill in …

Member Avatar for stultuske
0
282
Member Avatar for faysal515

I am working on a dynamic project for my own but struggling to create an article. The idea is that one registered user can publish an article with an image . <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <!DOCTYPE html PUBLIC …

Member Avatar for Deepak_11
0
1K
Member Avatar for murali2489

Hi All, I have created a Java applet in Eclipse and ran it in eclipse, it works fine . To run the applet in Webbrowser it was mentioned to embed the .class file inside a webpage by creating a HTML file. My class name is MyFirstGUI. i have created a …

Member Avatar for murali2489
0
280
Member Avatar for yusking

Using an SQLite database your program should be able to create, read, update, and delete room reservations. Present the user with a menu at the beginning using the console or JOptionPane for example: Choose a task 1. Add a reservation 2. View a reservation 3. List all reservations 4. Update …

Member Avatar for stultuske
-2
2K
Member Avatar for gauravagg2

HI!!!! i am a student of B.Tech 3rd year plz suggest me a mini project in java i have basic knowledge of swing and jdbc and elementary idea of networking

Member Avatar for JamesCherrill
0
542
Member Avatar for mrosario

hi guys, i'm really having a trouble with my conversion code... it says the NumberFormatException with this "Student[] studs = new Student[Integer.parseInt(fr.nextLine())];" but i have no idea why. can someone help me? import java.util.Scanner; import java.io.*; public class SampleFileProcessing implements Serializable{ private static Scanner fr; public static void main(String[] args) …

Member Avatar for mrosario
0
2K
Member Avatar for evan.winstead.7

Hello! I am looking into game development, and recently discovered that most cube based games (with procedural generation) are coded in java, and i was wondering why that is!

Member Avatar for evan.winstead.7
0
236
Member Avatar for newbie14

We have socket application which sends out quite a number of email out. So we decided to send huge number message into it which will trigger emails. Eventually we see the email are taking hours before it reach any of the inboxes either gmail,hotmail or yahoo etc. We have this …

0
416
Member Avatar for lena1990

HI, I WANT TO PRINT THE ASCII OF THE FOLLOWING TEXT ÇÑÔÏ ÇäæÑ ÇÈÑÇåíã BUT ALL I GET IS 63 63 63 63 32 63 63 63 63 63 63 63 63 63 ?????????????? I WILL BE GREATFUL FOR ANY HELP THANKS IN ADVANCE

Member Avatar for TokamakFusion
0
163
Member Avatar for game06

I am trying to create android project in eclipse, for some reason it doesnt create gen > R.java file. I did clean project and doesnt work. any ideas?

Member Avatar for mustafaneguib
0
70
Member Avatar for xxmp

Hello When i am trying to build the apache-james-2.3.2 i have this problem Buildfile: build.xml /Users/xxmp/Desktop/James%20Project/apache-james-2.3.2/check-targets.ent could not be found setup-dependencies: javamail-check: activation-check: check-dependencies: prepare-common: Preparing code prepare-phoenix: Phoenix distribution present - adjusting linefeeds and permissions, copying files prepare-mxinfo: Writing Info descriptors as legacy xml. prepare-metainf: prepare: compile-main: Compiling James …

Member Avatar for xxmp
0
161
Member Avatar for muhammad.a.haq

public class naming { private String name ; private String address ; private int idCard ; private int firstMoney; public naming() { name=""; address=""; idCard=0; firstMoney=0; } public naming(String n , String ad ,int id , int fm ) { name=n; address=ad; idCard=id; firstMoney=fm; } public String getName() { return …

Member Avatar for muhammad.a.haq
0
221
Member Avatar for mesbahuk

I have a Java code block like following: public TcpConnection(TcpSocket socket, long alive_time, ITcpConnectionListener listener) { init(socket,alive_time,listener); start(); } For the conversion in C#, When I try to replace the `start()` method with `System.Threading.ThreadStart()`, it gives an error. How can I start a thread in C#?

Member Avatar for ddanbe
0
281
Member Avatar for abra_ka_dabra

Training data: f(1)=0.1 f(2)=0.2 f(3)=0.3 Test data: f(9)=0.9 f(10)=1.0 f(11)=1.1 can you please tell me how the data will look like in training data file and test file?

0
88
Member Avatar for vinnitro

I am creating a game of Racing cars in java But the problem is that my car when moved in any direction makes flickering on the screen. As the project is a Core java project it can only be made in a Windows application form. I set the speed of …

Member Avatar for JamesCherrill
0
2K

The End.