3,978 Topics

Member Avatar for
Member Avatar for hwoarang69

how to create groovy client? getting an error, below. ** # start up jboss with following paremater: # ** set JAVA_OPTS= -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=C:\Java\jdk1.7.0\jre\lib\management\jmxremote.password -Dcom.sun.management.jmxremote.access.file=C:\Java\jdk1.7.0\jre\lib\management\jmxremote.access" ** # test jboss is started: # ** http://localhost:9990/ username: abc password: abc1# ** # Groovy script: # ** import javax.management.ObjectName import javax.management.remote.JMXConnectorFactory as …

Member Avatar for hwoarang69
0
514
Member Avatar for moaz.amin.37

hello every body. I need a book at java swing package.i am new in java programming and i want to learn GUI so plz help me. i want to download book of herbert schildt. book name swing a beginner guide Author Herbert Schildt

Member Avatar for stultuske
0
352
Member Avatar for kishor.m.n

Hi all, I was just trying to write a simple prog in which i'm trying to add multiple components to a JPanel and inturn i'm adding that to a JScrollpane. Now the problem i'm facing is when i run the prog i can see the contents of the panel(not all) …

Member Avatar for mKorbel
0
10K
Member Avatar for Violet_82

HI guys, I wonder if you can help me understanding this please. Take the following code: // Fig. 14.23: ListFrame.java // JList that displays a list of colors. import java.awt.FlowLayout; import java.awt.Color; import javax.swing.JFrame; import javax.swing.JList; import javax.swing.JScrollPane; import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionEvent; import javax.swing.ListSelectionModel; public class ListFrame extends JFrame { …

Member Avatar for Violet_82
0
198
Member Avatar for asaidi

Hi i have 2 tables customer (cabinet_num which is integer) and cabinet (cabinet_num Autoincrement and cabinet_title) in my java i can display cabinet title to let the user choose a cabinet..but i want to collect the cainet_number in my customer table customet.cabinet package cabinet; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; …

Member Avatar for mKorbel
0
303
Member Avatar for Slavi

I am trying to create a runnable jar file .. did a few days ago with a single class and worked fine but now it doesn't seem to be working as good with multiple files .. Here is what I did 1) - create manifest.txt the contense of it is …

Member Avatar for Slavi
0
520
Member Avatar for toring

Hi, I jus want to ask why is it that the pacman will move but it will get larger when it is painted..also is that the proper way to draw?. here is the code import javax.swing.*; import java.awt.*; public class Mypacman extends JFrame implements Runnable{ int x; public Mypacman(){ setVisible(true); …

Member Avatar for JamesCherrill
0
491
Member Avatar for VernonDozier

OK, I have been experimenting around with GridBagLayout and I'm getting the hang of it. Things are looking the way I want them to on the INITIAL drawing of the GUI. However, when I RESIZE the JFrame to make it smaller vertically, at a certain point, the proportions get skewed. …

Member Avatar for Doogledude123
0
4K
Member Avatar for moaz.amin.37

i have a problem with code below import javax.swing.*; class HelloWorld { public static void main(String x[]) { JOptionPane.showMessageDilog(null,"Welcome","Bscs",1); } } i try my best but i can not understand the following error HelloWorld.java:5: error: cannot find symbol JOptionPane.showMessageDiloge(null,"Welcome","Bscs",1); ^ symbol: method showMessageDiloge(<null>,String,String,int) location: class JOptionPane 1 error plz help …

Member Avatar for mKorbel
0
177
Member Avatar for Vegito1991

I have assigned to create a multichat application that require to public message to all client, private message to certain client and show the user list, anyone can tell me which part should i do to implement private msg and online user list (where will show the name after client …

Member Avatar for stultuske
0
2K
Member Avatar for Traumatized

Hello, My Toshiba Satellite Laptop has horizontal lines running across the screen upon start up. I can not see my desktop underneath the lines. The problem was intermittent, and is now happening daily. To stop the lines and display my desktop on the screen, I have to swing my laptop …

Member Avatar for john_69
0
1K
Member Avatar for AbstractEden

I'm having some issues with one of my bonus assignments for school. In my code the purpose of the project is posted, but this is what I have so far. /******************************************** *File Name: Combination (Assignment 8 Part 1) *Purpose: Create a frame with ten buttons, labeled 0 through 9 (Hint: …

Member Avatar for Hiroshe
0
1K
Member Avatar for nickkipr

package dmaze2; import java.awt.Dimension; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class Dmaze2 extends JPanel { JTable jt; ImageIcon Icon = new ImageIcon("x.png"); JTable imagelabel = new JTable(Icon); public Dmaze2() { Object[] columns = {"1","2","3","4","5","6","7","8"}; Object[][] table={{"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","o","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}}; …

Member Avatar for mKorbel
0
239
Member Avatar for Vlad_2

// Convert Celsius to Fahrenheit and vice versa. import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.JTextField; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; public class ConvertTemp extends JFrame { // instance variables JLabel labelFahr; JLabel labelCels; JTextField textFahr; JTextField textCels; JButton conFahToCel; JButton conCelToFah; public ConvertTemp () { super …

Member Avatar for Vlad_2
0
8K
Member Avatar for SpottyBlue

I was doing my 2nd assignment to create a bank program using Java. I got a problem when I run a few times. For example, I entered the starting amount as $50000. Then, I choose withdraw. I tried to enter withdrawal amount as $5000. Then, I choose to check balance, …

Member Avatar for howemonster
0
418
Member Avatar for Vegito1991

I have been struggled to solve this problem for few days, i was working on multichat application where in this class i want to send the text to the server and and response in the client side, if anyone can help me i really appreciate from what i known the …

Member Avatar for JamesCherrill
0
384
Member Avatar for CervantesLost

Hi, I picked up this code on daniweb and am trying to get it further. Here's the class import java.util.*; import javax.swing.*; public class LibraryBook { private String title; private String author; private int pageCount; //contructor for books title, author, page public LibraryBook(String bookTitle, String bookAuthor, int bookpageCount) { title …

Member Avatar for JamesCherrill
0
188
Member Avatar for masonketcham

This is the last part to my assignment and when I go to compile the last part I come up with 7 errors unsure what it is that it wants me to do. The errors are: C:\Users\Owner\Desktop\week9 part6\Inventory6.java:212: error: illegal escape character strPrice = strPrice.replaceAll("\$", ""); ^ C:\Users\Owner\Desktop\week9 part6\Inventory6.java:270: error: …

Member Avatar for masonketcham
0
187
Member Avatar for Khan_1

import javax.swing.*; public class BankAccount { //======== fields (attributes, members)====== private String name; private String acctNo; private double balance; private final double MIN_BALANCE = 50; /** initialize all fields as default values */ public BankAccount() { name="N/A"; acctNo="00000"; balance=0; } /** initialize the fields @param n initializes name @param aNo …

Member Avatar for jwenting
0
463
Member Avatar for masonketcham

I've got all my parts to inventory part 5 to compile successfully but when I go to run the program I get this message, I am unsure what to do. I know that it possibly means something to do with the image. I've checked the errors that came back and …

Member Avatar for stultuske
0
140
Member Avatar for TrustyTony

I am looking for alternatives to setup a server in work place which does not allow to setup new software to computers to check and reserve rooms for meetings both through local network computers or possible from home / on the move. I of course would like to have thy …

Member Avatar for TrustyTony
0
295
Member Avatar for Violet_82

Hello, since I have realised how little I have understood of the GridBagLayout, I thought I'd open a thread where I could clarify one by one all my doubts. I have produced a very small and simple GUI which I will use to test the GridBagLayout and ask questions as …

Member Avatar for Violet_82
0
666
Member Avatar for smartguy360

I tried dreamincode but the mods there all seem to be on their periods tonight so i have come here to humbly beg for help. First off let me start by saying I'm a new programmer and I am frustrated and cofused by the class i'm in prg 420. I …

Member Avatar for jwenting
0
394
Member Avatar for Techboy52

//My objective of the program is using scanner class to get the input from the user and use a dialog box(JOptionPane) for output. When I compile the file I was able to enter the input from the scanner class, but I did not see the dialog box for the output …

Member Avatar for stultuske
0
4K
Member Avatar for umaima_1

//When ever I add TextFields the frame disappears.line 73-76,108-111; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class fitness extends JFrame { private double height=13.5; private double weight=45.3; private int age=20; private String sex="Male"; public fitness(int x){ this.age=x; } public fitness (double wei,double hei){ this.weight=wei; this.height=hei; } public fitness (double height,double …

Member Avatar for mKorbel
0
201
Member Avatar for masonketcham

To my Inventory Program Part 4 there are three parts and I was able to compile successfully with the first two. I end up get several errors with part 3 and I am unsure to why. This is what I have. import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.FlowLayout; import …

Member Avatar for Doogledude123
0
349
Member Avatar for santi.ayasamy

Sir, i need ur help, this is audio stego i can`t play my encrypted audio package techmeet1; import javax.swing.*; import java.io.File; import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; import java.util.*; import sun.audio.*; import java.applet.*; import java.math.*; class mainframe extends JFrame implements ActionListener, Runnable { JLabel Lfilename, Lmessage, Ldesign, Ltitle; …

Member Avatar for JamesCherrill
-1
525
Member Avatar for maurice.tracey.7

hi thier i was wondering if you guys could hep me when i press equall it calculates but when i press equall again it adds the first number added, for example if i was to enter 3 + 2 = 5 if i press enter again it equalls to 8 …

0
187
Member Avatar for Gerock7

import javax.swing.JOptionPane; public class StudentReport { String name; //name of the student String schoolName; //name of the school String schoolGrade; //grade in school int numOfGrades; //number of grades or number of classes double grades; //grades received double average; //average of the grades double total=0; //initialize total String trash; //to convert …

Member Avatar for stultuske
0
277
Member Avatar for asaidi

Hi i m trying to make a combobox that user can choose a value from a table this value then it is saved i have the code really i m stucked on combobox.. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; //The API for …

Member Avatar for asaidi
0
2K
Member Avatar for teitsu

package userinput; /** * * @author CHIEF_OGUNDE */ import javax.swing.JOptionPane; public class Main { /** * @param args the command line arguments */ private static void show(string, "Not Yet Implemented"); public static void main(String[] args) { // TODO code application logic here int ERROR_MESSAGE; String first_name; first_name = JOptionPane.showInputDialog("First Name","Enter …

Member Avatar for stultuske
0
203
Member Avatar for SoloMonk

I am trying to figure out how to center the labels labeled blackSection, blueSection and so on. However i am unable to get the labels to center. I have tried blackSection.setVerticalAlignment(JLabel.CENTER) also have tried blackSection.setVerticalTextProperty(JLabel.CENTER). Any help would be appreciated, it is however a homework assignment so hints as to …

Member Avatar for SoloMonk
0
2K
Member Avatar for kristian.ssyn

I've been trying to resize my jbuttons to the size of my pictures, but the jbuttons keep on occupying the whole frame. The size of the photos are 150x267. import javax.swing.*; import java.awt.event.KeyListener; import java.awt.*; import java.awt.event.KeyEvent; import java.util.Timer; import java.util.TimerTask; public class StartGame extends JFrame implements KeyListener { Timer …

Member Avatar for JamesCherrill
0
13K
Member Avatar for kristian.ssyn

Hi! I'm just new at GUI programming and I've been busy creating a GUI for my project. My image won't show up in this particular code. I've made two other classes and the images load perfectly. import javax.swing.*; import java.awt.image.*; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class Battle implements …

Member Avatar for JamesCherrill
0
269
Member Avatar for susanna.newkirk

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package theaterrevenue; import javax.swing.*; import java.awt.*; import java.awt.event.*; /** * * @author */ public class TheaterRevenue extends JFrame { final double percent = .20; double adultCost; private JTextField label2; private JTextField …

Member Avatar for susanna.newkirk
0
773
Member Avatar for rubeea.jaffari

Hello everyone, I am designing a simple game with graphics in which I am trying to add a keyListener to my Jframe but the keyListener nor the mouse Listener seem to respond. Here's the code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; import javax.imageio.ImageIO; public class PaintDemo …

Member Avatar for JamesCherrill
0
444
Member Avatar for erik.pierce1

I cannot for the life of me get my GUI to comeup with my deckPanel displayed along with my JButton that I intented to add an Action Listener to. THanks for looking. I am sure it has something to do with my object creation and method calls. import javax.swing.*; import …

Member Avatar for erik.pierce1
0
132
Member Avatar for d.sign

I need help regarding with the computation of what the user order it seems that the options doesn't have a value to be computed please help me how to put values in every options and one more thing is i need help with the codes for the checkbox for additional …

Member Avatar for stultuske
0
379
Member Avatar for stikku

Is it possible to call repaint() inside the main()?I have tried the code below.But its not working public mypanel() { initComponents(); repaint(100,150,40,40); } protected void paintComponent(final Graphics g) { final Graphics2D g2 = (Graphics2D)jLabel2.getGraphics(); g2.drawRect(100,150,40,40); } //above code doesnt provide any output private void formMouseClicked(java.awt.event.MouseEvent evt) { repaint(100,150,40,40) } this …

Member Avatar for JamesCherrill
0
260
Member Avatar for pankajagar2002

Hi, We are facing font issue in our java swing application in linux. Kindly help to solve issue. In our application we are explicity setting font as 'Arial' for labels and others in swing Application. Since Arial is not available in linux so it picks 'Lucida Sans Regular' as default …

Member Avatar for iamthwee
0
765
Member Avatar for HelpMEPLZ!!!

Hi everyone My code is still a bit messy as I;m pressed for time. I have to write a simple game you play against the computer. I have my StartGUI class which instantiates the GUI and then I have a Game of Life class, which does not have a JFrame, …

Member Avatar for HelpMEPLZ!!!
0
318
Member Avatar for Dae14

Write a program that will allow tutors to record tutoring activities. A tutor needs to keep track of who come for help (name, student ID), started at what time (sign-in time), ended at what time (sign-out time), for what course, his/her professor name, a short description of the problems he/she …

Member Avatar for HelpMEPLZ!!!
0
203
Member Avatar for soujanya.bhat.184

Hi All, I am learning Multithreading in Java and came across this code using SwingWorker for GUI multithreading. Here is the modified code done by me. import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.SwingWorker; public class MainFrame extends JFrame { …

Member Avatar for mKorbel
0
363
Member Avatar for Decode098

import javax.swing.JOptionPane; public class Hotel626 extends javax.swing.JFrame { public Hotel626() { initComponents(); } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jProgressBar1 = new javax.swing.JProgressBar(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); setResizable(false); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Pic/Entrace.jpg"))); // NOI18N jButton1.setBackground(new java.awt.Color(0, 0, …

Member Avatar for stultuske
0
272
Member Avatar for sciprog22

Hello, I am writng a simple networking program with a single server and multiple clients. I would like to send and receive objects between the clients and the server and hence I use the ObjectOutputStream/writeObject(Object) and ObjectInputStream/readObject() combination. First, my server program: import java.net.*; import java.io.*; import java.awt.*; import java.awt.event.*; …

Member Avatar for sciprog22
0
907
Member Avatar for 1bung100

I've created a JButton and a Jtextfield in java swing. I want the button to perform the same function as BackSpace key of the keyboard. Is there any means to assign the properties of the the BckSpace key to the button, i.e. inheriting the properties of the key.

Member Avatar for Kubu Letuka
0
2K
Member Avatar for pekemp23

We just need the save button to save to a sql database. This is done other than that. it is saying, "Error: No suitable driver found for jdbc:derby:charityDB;create=true" import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; // Event listener import java.text.NumberFormat; import javax.swing.*; // GUI building import java.io.*; import java.sql.*; // JDSB …

Member Avatar for jwenting
0
454
Member Avatar for sciprog22

Hello, I have two programs: a) Server.java : Using a JFileChooser, selects a file and then sends it to Client. b) Client. java: Displays the file. My problem: I am able to send a file from server to client only once. The ObjectOutputStream.writeObject() does not work after that. I later …

Member Avatar for sciprog22
0
439
Member Avatar for Xabush

I'm working on a project on my own and wanted to create an JComponent or JFrame that looks like the following screenshot. ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-left") ![8557bdcb155e0af7b29ae22b32d6f984](/attachments/small/4/8557bdcb155e0af7b29ae22b32d6f984.JPG "align-right") Here is its layout. ![e687f5cd32e6536ff8d0e3406b83b9e2](/attachments/small/4/e687f5cd32e6536ff8d0e3406b83b9e2.png "align-left") ![e687f5cd32e6536ff8d0e3406b83b9e2](/attachments/small/4/e687f5cd32e6536ff8d0e3406b83b9e2.png "align-left") I would appreciate it if you showed me by an …

Member Avatar for mKorbel
0
289
Member Avatar for Hunter2379

So my server sends information and receives information. I know this because i tested it on the local host. The problem is that the portion it receives comes out with little squares after the user input. Here is a picture of the problem. [url]http://img706.imageshack.us/img706/3342/outputc.jpg[/url] [url]http://yfrog.com/jmoutputcj[/url] Thank You Server Code: [code]import …

Member Avatar for ROurOu
0
664

The End.