3,978 Topics

Member Avatar for
Member Avatar for scheppy

Hi Guys Just starting to make my first java game, im getting a few errors. Im just trying to figure a few things about about the game loops before i get started and this is driving me crazy when i just call the renderer to repaint after i initialize the …

Member Avatar for scheppy
0
1K
Member Avatar for divinity02

hi pple I am building this electronic role using an interface. during the course of designing the interface, tried running it just to see the look and feel of it and it is not showing can someone tell me why this happen. here is the code. havent start coding it …

Member Avatar for divinity02
0
3K
Member Avatar for Cj_5

Hi, first timer here so sorry before hand if I forget to mention something. My code run the window fine but when I hit the calculate button I receive an error message. Firstly this is my code package Chapter12; import javax.swing.*; import java.awt.event.*; public class TheaterGUI extends JFrame { JTextField …

Member Avatar for JamesCherrill
0
551
Member Avatar for Sinisa_1

Good man James helped me learn die roll board game programming in Java, and I applied it on Ladders and Snakes. Made one in Java. Now I'm learning to do it in Android. Here's the question: Making simple Ladders and Snakes game. Can't use those in Google Play, they don't …

Member Avatar for Sinisa_1
0
3K
Member Avatar for divinity02

hi this is one of my assignment that I have to do. it is a triangle calculator. everything well with it but it just the calculation. when I run it, it gives a zero output. I think it may be my calculation. can someone take a look at it and …

Member Avatar for tinstaafl
0
287
Member Avatar for divinity02

hi james cherril I am doing a voting system application of which I have to hand up today. I am getting a runtime error when I entered a record and try to save it. as I entered one record and when the save button is pressed it give me a …

Member Avatar for divinity02
0
323
Member Avatar for Sinisa_1

Good day to everyone. I need help. Have to make more of these and need someone to show me how. My code doesn't work the way it should. It would have to * wait for you to click jbutton and then: - disable jbutton - roll die, then start timer …

Member Avatar for Sinisa_1
0
1K
Member Avatar for Jason_24

Hi everyone, I am having some problems with this problem. I know I am almost there but I think I am not quite getting it. I get this error when I run it. Exception in thread "main" java.lang.NullPointerException at Newspapers.Subscribers.main(Subscribers.java:14) Can you guide me to the right direction. Thank you. …

Member Avatar for stultuske
0
4K
Member Avatar for tor-arne

Yes i do know this have been posted atleast two times before, but i can hardly get anyhelp out of it. So back to my post, trying to figure out what i am doing wrong, and why my class wont compile. So i am not really sure what to do, …

Member Avatar for JamesCherrill
0
2K
Member Avatar for divinity02

hi I am trying to build a triangle calculator that can tell you if you can form a valid triangle, I have reach the calculation part as yet just the part of the gui and that is the part with the error. something is wrong and i cant seem to …

Member Avatar for divinity02
0
628
Member Avatar for John_165

I have multiple JSpinner which have items 1-10 , and one JTable. When the JSpinner is clicked, the value will be added to JTable. I want to get the row number so I can use it at setValueAt. But I get error when the JSpinner clicked more than once times. …

Member Avatar for JamesCherrill
0
1K
Member Avatar for skitband

/** * Help me to solve this one * * The input for input dialog should appear at right textfield * * ex. your firstname? >>> john * john should appear at the textfield label firstname */ import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.JOptionPane; public class Info extends Applet …

Member Avatar for JamesCherrill
0
559
Member Avatar for John_165

In my Food Tab, I wanted to achieve this [Click Here](https://sfault-image.b0.upaiyun.com/358/064/3580648794-597611aa1f701) But I only able to get this [Click Here](https://sfault-image.b0.upaiyun.com/779/111/779111227-5976120f6955a) How can I increase the width of the JTextField which are in Food Tab ? Below is my code public class FoodOrdering { static private JFrame frame; static private JTextField …

Member Avatar for JamesCherrill
0
917
Member Avatar for Navnath999

I want to crop an image manually using the mouse. Suppose the image has some text, and I want to select some text from an image, then for that purpose I want to crop that area by using the mouse.

Member Avatar for Sri_6
0
4K
Member Avatar for tarun_6

Can anyone guide me to find a way to convert swing application to Android app. If we just create the gui using xml is it enough to take the working code from the previous swing application to run on Android

Member Avatar for tarun_6
0
2K
Member Avatar for Andres_5

Hi Guys Im A Noob, so i need your kind perception on my code Im running A Table Anytime i do it i get this message Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet. And this is My Table Code: private void tablaLISTADOMouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling …

Member Avatar for JamesCherrill
0
632
Member Avatar for rithish

[CODE] import java.awt.*; import javax.swing.*; import java.awt.event.*; class log extends JFrame { JButton b1=new JButton("ok"); JPanel panel=new JPanel(new GridLayout(2,2)); public log() { panel.add(b1); add(panel,BorderLayout.CENTER); b1.addActionListener(new ActionListener(){ public void actionperformed(ActionEvent ae){ JPanel pan=new JPanel(); JFrame frame1 = new JFrame(); JButton b2=new JButton("ok"); pan.add(b2); frame1.setVisible(true); frame1.add(pan); frame1.setSize(250,100); b2.addActionListener(new ActionListener(){ public void actionperformed(ActionEvent …

Member Avatar for ajax_1
0
2K
Member Avatar for tarun_6
Member Avatar for Badulla

i have wrote this program which uses binary search to search for a desired word and which displays the word along with the meaning of that particular word.but each time i print the data that the arraylist contains it just print the word being search but not the meaning of …

Member Avatar for JamesCherrill
0
365
Member Avatar for peter20

Hi all, I have a class CAR.java public class CAR { private int ID; private String model; public CAR(int ID, String model) { this.ID = ID; this.model = model; } public int getID() { return ID; } public void setID(int ID) { this.ID = ID; } public int getmodel() { …

Member Avatar for peter20
0
304
Member Avatar for Trevor_5

below is the code i have and i am getting an unhandled IOException in the inputstreams: import java.nio.file.*; import java.io.*; import static java.nio.file.AccessMode.*; import static java.nio.file.StandardOpenOption.*; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class FinalProject extends JFrame implements ActionListener { JLabel guess = new JLabel("Guess the …

Member Avatar for JamesCherrill
0
357
Member Avatar for Christian_10

I need to separate the questions to atleast up to unemployment and after clicking the button it will go to another page and it resume the user from answering the question.. Thanks in advance.. <?php include('connection.php'); ?> <?php session_start(); if(!isset($_SESSION['id']) || $_SESSION['privilege'] != 'user'){ if(session_destroy()) // Destroying All Sessions { …

Member Avatar for diafol
0
320
Member Avatar for Mirty

Instructions are in the image above. This is what I have now. Everything is done except the last part where if you click Yes the program is supposed to continue with other calculations. This is where am stuck. import javax.swing.JOptionPane; public class OPTIMA2 { public static void main(String[] a) { …

Member Avatar for JamesCherrill
0
202
Member Avatar for Sameer_8

Hello i have an other code that bother me because i am confused what i should do take a llok to the questions first: **Example 2: The GradeBook Class: Consider the attached GradeBook class. Complete the following tasks: 1-Modify the determineClassAverage method so it allows the user to enter the …

Member Avatar for JamesCherrill
0
270
Member Avatar for divinity02

hi everybody I am currently creating a simulation of a pizza ordering system in object oriented program. I have some question. the instruction and guideline is long but I will try and cut it down a lot. the instruction is to create a program that simulate a pizza restaurant using …

Member Avatar for divinity02
0
2K
Member Avatar for Seijuro

Hello :) This is my first post. I haven't done a Java type program in a while (2-3 years). I am trying to write a simple program which displays a window with 5 buttons. When you click either the first or second button it should open another window within which …

Member Avatar for JamesCherrill
0
8K
Member Avatar for Rajesh8367

I am trying to generate a random image everytime someone clicks spin. I am not able to generate a random picture. Some help would be really nice. Thanks in advance. Here's my code so far : import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Random; import javax.swing.*; public class Gui { …

Member Avatar for Reverend Jim
0
833
Member Avatar for David_83

Hi guys. So I'm building this code in java using NetBeans and literally this code has been working fine the entire time. I haven't changed anything about it and now it's giving me an error and I can't find out what's wrong. Can you please take a look for me? …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Avinash_11

the code below is working, but it is displaying only one image in a blank page where there is no css I want it to display all the image in a table. please help me... <%@page import="com.sun.javafx.tk.Toolkit"%> <%@page import="java.awt.Image"%> <%@page import="javax.swing.ImageIcon"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@page import ="java.sql.*" …

0
175
Member Avatar for iMaZx

Question: Estimate the time it will take to cut the grass of five clients. Given the length and width (in meters) of a rectangular yard and the length and width of a rectangular house situated in the yard, compute the time required (in minutes) to cut the grass at a …

Member Avatar for rproffitt
0
447
Member Avatar for IcyFire

I made a client server program to send an image from the server to the client. The image is being sent being but its not showing up in client window immediately. If i click send on the server then i minimize (or maximize) the client window then open again the …

Member Avatar for rproffitt
0
7K
Member Avatar for Software_1

Our company is developing a large, database (MySQL) system on top of the Netbeans RCP. This is a Java Swing GUI based application. We want to take advantage of Rich Client Platform to develop the "Government Platform" and use its module project type to develop the "Government Modules", essentially Java …

0
387
Member Avatar for Serge_1

Hi all, I'm new in this forum and also completely newbie in Web development-so please forgive my lack of knowledge.. I'm modifying a Web template and I've inserted images slide on banner. I reduced images width to fit the size of the site width but still not responsive on others …

Member Avatar for Serge_1
0
291
Member Avatar for oresnik

Hi guys. I'm working on my school project. My asigment is to make a piano game. The program works fine but my work stopped when i came to a problem. I would like to put the integers, which i get from pushing the specific JButton, into an array. For example …

Member Avatar for Shaun_4
0
2K
Member Avatar for ZeroEddy

Hello there I am currently just making a sample website to try and get back into the swing of things but I am encountering a problem with one of my divs. The div giving trouble is the leftContent div. I want to set the height of it to fit the …

Member Avatar for ZeroEddy
0
464
Member Avatar for Violet_82

Chaps, I wonder if you can give me a hand with this. Here's the brief: "Create a program that draws 10 random filled shapes in random colors, position and sizes. Method paintcomponent should contain a loop that iterates 10 times. In each iteration, the loop should determine whether to draw …

Member Avatar for Verse_1
3
5K
Member Avatar for Tre Sivileo

Hey new to JDBC SQL DERBY and Java so I don't know why but my Jtable only shows the columns. Here are my codes for my LeaderboardDAO class. public class LeaderboardDAO extends Dao { private static final Logger LOG = LogManager.getLogger(PlayerDAO.class); public static final String TABLE_NAME = "leaderboard"; private static …

Member Avatar for Tre Sivileo
0
372
Member Avatar for Alex_47

Hi, I have problem I can't add to the JTable new row (public void addRow(ArrayList<Object> newRow)) from the other class with action of the button Main.java import com.sun.javaws.Globals; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import javax.swing.event.TableModelEvent; import javax.swing.table.AbstractTableModel; import javax.xml.bind.annotation.XmlElementDecl; public class …

Member Avatar for zaraki
0
257
Member Avatar for ALV_IR

Hi,all .How would i make client/server app,to calculate surface area of the cylider. The server must read the cylinders radius and length from the client and calculate the surface area of a cylinder. The server will then return a double representing the surface area of a cylinder to the client. …

Member Avatar for JamesCherrill
0
2K
Member Avatar for m.a.x

Hi All, How can i get the swing/awt open and save dialog boxes while accessing from the client side ???

Member Avatar for JamesCherrill
0
1K
Member Avatar for MirorB

There are 3 JTextfields that are supposed to display info in each one after you click List Info and brings you to a new GUI and you automatically see the info in the JTextFields, but it's not displaying anything. Also I'm using Eclipse and SQLite Manager if that helps. Iogin, …

Member Avatar for MirorB
0
432
Member Avatar for Elizabeth_9

somebody help me with this please package py.com.sistemas_ventas.view; import java.beans.Beans; import java.util.ArrayList; import java.util.List; import javax.persistence.RollbackException; /** * * @author Mirtha */ public class DepartamentoView extends javax.swing.JFrame { /** Creates new form DepartamentoView */ public DepartamentoView() { initComponents(); if (!Beans.isDesignTime()) { entityManager.getTransaction().begin(); } } /** This method is called from …

Member Avatar for stultuske
0
593
Member Avatar for Richmond_1

When mario collide to the wall .. I want to go back to the flappyMario class and dispose the Game Class .. but dispose won't work .. I really appreciate if someone help me about this problem. Here is my Code import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Toolkit; import …

0
163
Member Avatar for Stephen_13

I know this is really messy code but I am writing a Paint app in Java for a class and I'm getting an ERROR when I drag the mouse. MousePressed works properly (prints). MouseDragged, however, throws a NullPointerException. Please let me know what the problem is here. I'll put a …

Member Avatar for JamesCherrill
0
426
Member Avatar for ericalanso

The eror says: llegal static declaration in inner class Question1.Question1Listener modifier 'static' is only allowed in constant variable declarations ---- /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the …

Member Avatar for JamesCherrill
0
472
Member Avatar for adikimicky

Hi everyone, I am trying to make a user login page. The user is required to fill username and password in textFields and when he clicks the Submit button, all details are needed to be written in the database. import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; public class register …

Member Avatar for Lakhveer
0
7K
Member Avatar for Doogledude123

Flickering occurs when Active Rendering with JPanel, not sure why as I've done this before (couldn't find source code of that project however). Relevant Code: Graphics g = projectDCWindow.getWindowGraphics(); // Gets the Graphics Object from a JFrame g.setColor(Color.BLACK); g.fillRect(0, 0, (int) ProjectDCInfo.getDefaultWindowSize().getWidth(), (int) ProjectDCInfo.getDefaultWindowSize().getHeight()); // Clears the screen projectDCGSM.get().render(g); // …

Member Avatar for Doogledude123
0
2K
Member Avatar for Steven_10

package com.company; /** * Log Nazi -- Created by Steven Richardson on 2/2/2016. */ import javax.swing.*; import java.io.*; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Scanner; /** * Created by Steven on 1/29/2016. */ public class LogReader { // declare variables static String theFile; static int rows = …

Member Avatar for Steven_10
0
980
Member Avatar for JaJavaBuddy

Hi, I need to complete this assignment. Everything seems to work except I need to output "T" and "H" along the dashed lines (respectively) everytime either the Tortoise or the Hare moves. Here is my code, thank you in advance. import javax.swing.JOptionPane; public class Tort { public static void main(String[] …

Member Avatar for raeee
0
2K
Member Avatar for AgentOxegen

I basically am working on a final project for JAVA and I cant figure out how to move the strings into the paint class. Here are my 2 codes. import java.util.Scanner; public class FinalProjectQuestions { public static void main(String []args) { Scanner in = new Scanner(System.in); System.out.println("We will design the …

Member Avatar for JamesCherrill
0
250

The End.