3,978 Topics
![]() | |
[code] import java.awt.*; import java.awt.Event.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.*; import javax.swing.*; public class UpdateRecord implements ActionListener { private ScrollingPanel fields; private JTextArea output; private Connection connection; public UpdateRecord(Connection c, ScrollingPanel f, JTextArea o) { connection = c; fields = f; output = o; } public void actionPerformed(ActionEvent e) … | |
Hello everyone I am a new to java and I am trying to get help with my inventory program. Here is the assignment ..Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, … | |
I am trying to teach myself java and I have a book but it doesnt have how to parse an int into a string. So are there any ways of either doing this or getting round it so I can display my answer? I put in bold the place where … | |
Hi, I need help with drawing an ellipse that is bounded by the window it is drawn in. I have to use the Ellipse2D API. Maybe I'm overlooking something but I can't seem to get the circle to fit the window. This is what i have so far: [CODE]import java.awt.Color; … | |
![]() | ******I need help with my project. Here's the specs********** CS123 MP2 Database Table 1. On Load of the program it will read all files and put its data to the memory. a. Data file - this must be in CVS (Comma Separated Values). The first line is a header that … ![]() |
Hello all, how to remove a selected row in Java swing(JTable). If any one knows this please help me... | |
I having a small problem with the output on the Your CD's side, they are only viewable if I double click inside the pane, then they show up, almost like the pane is on top. How can I fix, I have tried moving things around and changing the TextArea to … | |
Hello! I am trying to add new data into a database. What is the mistake in my code? I got the error message such as "general error". [code] import java.awt.*; import java.awt.event.*; import java.sql.*; import javax.swing.*; public class AddRecord implements ActionListener{ private ScrollingPanel fields; private JTextArea output; private Connection connection; … | |
import java.sql.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class DisplayQueryResults extends JFrame { private Connection connection; private Statement statement; private ResultSet resultSet; private ResultSetMetaData rsMetaData; private JTable table; private JTextArea inputQuery; private JButton submitQuery; public DisplayQueryResults() { super( "Enter Query.Click Submit to See Results." ); String url … ![]() | |
I want a line of buttons down the side of a swing window. I got this code so far: [code=java]import javax.swing.*; import java.awt.*; class basic extends JFrame // implements ActionListener { public basic() { super("Till"); setSize(600,500); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); Container contentArea = getContentPane(); contentArea.setBackground(Color.white); BorderLayout flowManager = new BorderLayout(); contentArea.setLayout(flowManager); JPanel … | |
ok I have a program that is suppose to use dialogs boxes to obtain input and display output and also use console input an output. But here is the thing, I believe my code is a little right but don't understand the errors, can somebody help me please, here is … | |
I can only get 2 of the buttons to work - what am I doing wrong? I have been working on this for 5 days. I also cannot get my icon to work - do I need more of an address? [CODE] import java.util.ArrayList; //For ArrayList public class Product implements … | |
Hello, Well guys, I consider myself a beginner in Java generally and in JMF in particular, and actually I am student at the University and doing my project which creating Multi-video-Players (kindly check out my code in the bottom), so I have 6 different players and each one plays different … | |
Hello all, very useful forum you guys have here. maybe you might be able to help me with an issue i am having with a program i am writing? I am trying to dynamically load a class that the user specifies. I am coding in standard java 1.5 and swing. … | |
[QUOTE]I have tried to rezize my output window by changing the values in the width and legth - nothing happens. What am I doing wrong?[/QUOTE] [CODE] private final static int FRAME_GRID_ROWS = 3; private final static int FRAME_GRID_COLS = 1; private final static int FIELD_PANEL_ROWS = 10; private final static … | |
Hi, I am trying to create a simon-says type game, where there are four icons of different colors. One icon lights up. The user clicks it. Next, a new icon lights up. The user clicks the sequence... etc, etc, etc. Right now, the first round works. Unfortunately, the icons do … | |
I have done a stand alone project on Java Swing and MySql where the frontend is designed by Swing and backend is designed on MySQL I wanna build an exe of the project by incorporating the MySql schema and tablespace into the archieved file(exe/jar) Plz tell me whether is it … | |
I want to make: when i click a button after I've given some input it checks & if successful it opens a new window/page i.e I want to create a link....till now I've done [CODE] import javax.swing.JOptionPane; public class inputwindow { /** * @param args */ public static void main(String[] … | |
For those of you who also code in JAVA*: Does anyone know of anything in C++ that is at all like paintComponent or the Graphics class? HALP! *ROFLwaffles to those who do | |
hai , all This coding about filter data using jTextFiled and display in jtable, so help me to combine these class be one class. thanks [CODE] //DBAccess.java import ca.odell.glazedlists.BasicEventList; import ca.odell.glazedlists.EventList; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class DBAccess { private static Connection c; private … | |
I cannot explain this problem, and in searching all over I've seen a few leads but no help. I do not understand at all why I get this exception. It claims I am trying to cast a JList as a DefaultListModel when I'me trying to cast a ListModel and a … | |
I have 3 things left I want to do to this app, I saved the hardest for last ... now I am wondering why. First is a search button. I want to be able to Search on my cd name field. I have been reading and playing with this since … | |
I do not even know if I can do this, so this may be quick and painless. I have my existing code, all the fields, buttons, scroll panel and everything else where I need them. Simple FlowLayout is fine for what I am doing. Yesterday I created this goofy little … | |
Looks like I only made it a day and a half without a new question. I am not sure if that is good or bad. I have everything just about the way I want it. I am now putting new buttons in to my GUI to manipulate everything put in … | |
I am sure anyone here for more than an hour is familiar with the project I have been working on. I am currently researching listeners to try and get my fields to execute the proper calculations when moving from one to the next. Right now, even though I have those … | |
Hedging my bets, I have coded a simpler version of the program Ezzaral is helping me with. I fear I am in over my head over there and may just begin to annoy him with silly questions. Most of what he and I are working on is beyond the scope … | |
hi, all how to using swing component jtree with jcheckbox in netbeans 5.5 i have got code from this link [url]http://www.jroller.com/santhosh/date/20050610[/url], but i can't combine with my project i hope somebody give me solution for my problem. thanks. | |
I have spent the weekend reading about GUI and how Java uses it, and all I got was confused. :o) I decided the best way to learn it was just to get in to it and start coding, so that is what I did. Went better than I thought it … | |
Hi need help and explanation to fix the following error in my java program. I can not get the program to show a gui pop-up window. I have to turn this end by 12midnight EST. Just looked at this code, when you see that dos window and no GUI it … | |
Hi... i want to align the components on the panel so that the components r fixed on the panel ..and the page should be scroll down so that i want to add scrollPane to it..can anyone help me.... This is my Code............. //contact Details import javax.swing.*; import java.awt.*; public class … | |
Hey guys., I just want to know about the MVC pattern in java swing. up to my knowledge i knew ...... Model is used for storing information like Scrollpane height=50 width=60 like that and view is used to show the output view.. like how scrollpane looks like... and controller is … | |
So I've got this jtable set up that displays the contents of an arraylist by use of the handy dandy table model (see code below). you'll notice it calls a method makeTableArray() (see code below) in order to figure out what the array that its going to use is. In … | |
I have the slider code and the paragraph im going to put inside.That is create a horizontal slider bar, that will display individual words, each weight along the slider. So, at each step of the slider,a different words is displayed..so i need to load it up to the website using … | |
Hi, I am making tic tac toe, and I basically have it all working, except the GUI has a few bugs. Right now, I am not using a layout. I am using "setBounds" instead. When a player wins, an image saying "you win" should be displayed over the title image … | |
Does anyone know how to take a screen shot of a JFrame or any Java Swing application which is NOT visible? jframeobj.setVisible(false); Something to extract the information from the memory itself? | |
Hi, Im trying to list all the drives in the local machine in a combo box and when a drive selected all the folders and files in that drive must be listed ina list box. I was succesfull in listing the drives in the combobos.But when i try to list … | |
I did a Dots and Boxes game in java with Netbeans 5.5 I have a doubt because the game is between each two players, it's multiclient with sessions of two players. Client 1 send the message with sal.println to the server and the server to Client 2 but this client … | |
What i have to create is a program that establishes 2 structs with arrays of CD Albums and then search the arrays for album names and display the album name, Artist or group, songs and their track numbers. My question is; [COLOR="red"]have i missed something in the code?[/COLOR], because it … | |
I want the program to have the user select either Y or N to display the list of albums in the array, if the user entered Y to display the list of albums then have the user enter a name for an album from the list to search the array … | |
I have a code generated with netBeans. It use org.jdesktop.layout. I have the file swing-layout-1.0.jar. But I don't know how to compile and run mycode.jave with that jar file. Please write full comands if possible. I'm so new to java that every step use me 2 hours - 2 days. … | |
i want a calculator project just use applet not swing or frame i hav but i took just input through mouse but dont perform any operation | |
I'm trying to add an image to a button instead of text. I looked at some examples, and I can't figure out what I am missing. I've imported this because the ex. had it. Don't know if it is needed. [code=java] import javax.swing.AbstractButton; import javax.swing.JButton; import javax.swing.ImageIcon; [/code] Then this … | |
Need assistance in the assignment on using an Array of structs. I need to know if the array is initialized properly or what i need to do to get it initialized. Some code has been commented out until i get the array initialized. Here is the code: [code=cplusplus] #include<iostream> #include<iomanip> … | |
is there any available free calendar swing components available or am i going to have to make one from scratch? | |
I'm just trying to make a four-player card dealing game! But my problem is that my deck is eternal! I wan't it to deal 52 cards. So 13 card per person! The name of my persons are JLabel1,2,3,4! Can someone help me out! I'm working with Blue J and I … ![]() | |
![]() | Hi, I am designing a puzzle game and I am trying to use the data that comes back from "getLocation()". It tells me the x, y co-ordinates of a button on the screen but so far I cannot export the x, y data to a String or int. There is … ![]() |
Its pretty standard, why the hell isnt the window showing?? Cant figure it out :( [code] import javax.swing.*; import javax.swing.text.*; import java.awt.*; import java.awt.event.*; public class GUIpart { //All ze variables required int tempboard[][]=new int[9][9]; SudokuBoard fresh= new SudokuBoard(); JFrame sudoku = new JFrame("Srik Sudoku"); JFormattedTextField guiboard[][] = new JFormattedTextField[9][9]; … | |
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Square extends JApplet { int size; public void init() { String input = JOptionPane.showInputDialog( "Enter square size:"); size = Integer.parseInt( input ); } public void squareOfCharacters( Graphics g ) { String input = JOptionPane.showInputDialog( "Enter Character:"); int y = 50, x = … | |
I have been searching for a long time, and I cannot remember the name of this swing component that I attached in the image. It's the one that is captioned "Please input the...." I don't need help on how to implement it (beyond knowing the class name), I just forgot … | |
Hi, everyone, I just start study Swing . I have some small question about the JTable. Is there anyway I can make the Jtable to auto resize during the runtime when I maximize the window? My code did not display the stuff I put onto the Table, what did I … |
The End.