thanks for the help
Type: Posts; User: Damian3395
thanks for the help
Well, I'm not sure, I don't think so. This is my code, I'm programming with LWJGL.
My Button Class. Where it says System.out.println("Action Button"); under the input method. I want to change that...
I would like to create a class file in which I can change how a method in it works by writing it in another class file. For example,
button.addActionListener(new ActionListener() {
...
public static void loadPanel(JPanel oldPanel, JPanel newPanel){
if(oldPanel == null){
frame.add(newPanel);
}else{
frame.remove(oldPanel);
frame.add(newPanel);...
Thank you for the reply, I tried placing the UIManger before and after the JScrollPane.
scrollPane.getVerticalScrollBar().setBackground(one);...
News = new JTextArea();
News.setText("News");
News.setForeground(two);
News.setBackground(one);
News.setEditable(false);
News.setLineWrap(true);
scrollPane = new JScrollPane(News);...
Client:
public static void updateTest(){
try{
Socket clientUpdate = new Socket(host, 1026);
BufferedReader in = new BufferedReader(new InputStreamReader(clientUpdate.getInputStream()));...
package main;
import java.awt.*;
import javax.swing.*;
public class Window {
static JFrame window;
static Panels panel;
I'm sorry, but I tried to create it in the way you described in your post, but I couldn't make it work. I tried to google methods to use Graphics g in separate class files, but no dice. I have tried...
Sorry, should have known to do that. Thanks for the tip, I'm changing the method names right now. I don't want to add the graphics into a container, I thought I could just paint onto the panel...
I fixed the problem:
package main;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
package main;
import java.awt.*;
import java.awt.Graphics;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;
import java.util.*;
public class Window {
Boolean ErrorHour value is true because I checked using the JOptionPane message box.
Then I run this method, but when it runs to the if statement ErrorHour equals true, is doesn't work, the...
I have a theory on how to solve the problem, I will use several switch statements to help java process each if statement.
The JOptionPane.showMessageDialog(f, "Error First Name: " + ErrorName); in the try and catch piece of code is to only check for the value of the boolean, the check error pop up that is not working is...
Sorry,
I first go through a series of try and catch exceptions to check if there are errors in my JTextFields because ID, hHour, hRate can only contain digits and name and last Fields can only...
Lines 268 - 322 in public void ActionPerformed(command "add")
This part of my code checks if JTextFields name and last contain a digit, this is a check error that creates a JOptionPane to display...