35,618 Topics
![]() | |
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"); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
What are the differences and similarities of JAX-WS and JAX-RS? | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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) … | |
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! | |
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 … | |
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 | |
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? | |
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 … | |
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 … | |
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#? | |
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? | |
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 … |
The End.