3,978 Topics
![]() | |
so i am working on this table that have buttons combobox and checkbox... i did all of that and i am left whit one this i button that can add a icon in IMAGE column in the same row her is my main private JTable tb; private String[] comboData = … | |
I am trying to make a calculator, but I can not seem to figure out how to get the = operation to work. Everything else seems to be working fine, but I am just really struggling with the =. Any guidance in the right direction would be super helpful! import … | |
Hi guys, I am trying to add a new component to my window by clicking on a clickable jLabel. Better said, with mousevent. Unfortunately, it does not work, at least for what i tried with. Can you help me here? My code: package test_1; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; … | |
HI guys, as mentioned in my revious post, I'll redo my wordCount application using the GridBagLayout approach. The functionality of the application hasn't changed at all: I've only removed the various Jpanels and, for simplicity, used only the JFrame and attached all the comonents to the JFrame. I've had a … | |
Can someone help me figure out why is this not working..... The program supposse to take the data i load into the hashmap from the file and look for the user enters. and suppose to output the answer based on the case. thanks import java.io.File; import java.util.HashMap; import java.util.Scanner; import … | |
Hi i have a question how do i update database ,once i press on the field it gets active for adding :here is my form :  And here my code so far ,i try to code the update button,but it does updates the field,but not the database. package … | |
OK, so i do have a perfectly good working code but im trying a different way and its bugging me why its not working. any help would be much appreciated. the program suppose to list all the available directories and then ask the user which directory he's searching for, takes … | |
Hello guys, so im new to programming, but i've been given task by my school to create a simple games(flappy bird clone) in Java Console, without using java swing. my only help would be a library called Enigma. my concept are simple like this character=*, pipes=I can anyone give some … | |
I'm looking to get back in to help desk support and have been out of the loop for five years. Is there some place out there that I can find a community to help me get back in the swing of things? TIA | |
I'm used to using AWT's Canvas and BufferedImage and things like that. I've switched from using Canvas for drawing, to using a JPanel and I'm blown away by the efficiency. I intend on fully using Swing for all of my GUI. My question is, what is Swing's equivalent of BufferedImage? | |
 Here is the jframe above,images selected at random,the task is after image is displayed,choose from jcombo the answer,press submit and display in jtextfield below the answer:"Correct" or not.And untill the submitt button is not pressed ,disable the next button.How would i do this logic? So far i have … | |
i have this problem about the betting system of my game. Here's the scenario: Your money: 300 Your bet: 300 JOptionPane appears: "you have insufficient money to bet" Here's the code for the main program: /* * To change this license header, choose License Headers in Project Properties. * To … | |
/* * 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 editor. */ package my.GeographyQuiz; import java.awt.*; import javax.swing.*; /** * * @author K00190164 */ public class GeograpgyQuiz extends javax.swing.JFrame { … | |
Dear all, I was given a project to write a software that would track contracts. Everything is successful until I read or write the current data from the JTable to the textfile. This also happens when I read the textfile and insert the data into the JTable. The exception I … | |
Dear all, I was told to write an application for my assignment that would keep track of contracts. The problem is, I have no clue how I can make this application write JTable into txt file every 5 seconds and wheever application would open, it would read the txt file … | |
hello i m writing a program in which i try to write on the frame by mousemotionlistener and mouselistener methods till now i did the writing part and i i want to start that writing by clicking the button Ok then another frame is open in which i can write … | |
I'm a tad confused on a homework assignment. I'm supposed to write a program that displays a table of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. I got the loop to work just fine, but I'm supposed to display the results of the loop in a TextArea … | |
Hi there, I am having a problem in running my frame at Java Eclipse. It always says unkown source when clicking the button. I would like to insert the dat to the Jtable but it always display like this ` ## This is the error: ## Exception in thread "AWT-EventQueue-0" … | |
I'm doing a quiz game using netbeans. I've already done the randomization of questions. The problem is, how do i keep a question from repeating itself? ex: chose correct answer --> questionrandomizer comes in --> next question appears but it's the same question earlier here's my code: package kiddiequiz.scienceforms; import … | |
I have to display the mortgage payment amount and then list the loan balance and interest paid for each payment over the term of the loan but my output isn't changing. import java.text.DecimalFormat; import javax.swing.JOptionPane; public class MortgagePmt { public static void main(String[] args) { int term; //Term in years … | |
I have a samsung 320gb HDD. Recently i am fatching a boot failour. I am trying to give windows. But a massage swing "a disk error occourer" and can not reboot pc. Can anybody help me? | |
I have a problem with a project i'm working on, and I was wondering if it was possible to do what i'm thinking. Basically I have a simple mathematical GUI. I want it to take 2 inputs multiply them and output the answer. I am doing this all through the … | |
**I'm using netbeans btw if you notice the long code for the GUI** I'm doing a quiz game. The questions are randomized. My problem is, the randomized questions do not appear on the questionLabel (JLabel Variable). I don't know what to do. Help? /* * To change this license header, … | |
hii ^_^ I have a problem which is I have to delete a book when( I enter it's name and then press the delete button) and that book has been saved as an object in an array of list, and then written to a (txt )file.. once I press the … | |
# PLEASE some one help me to explain the code. This code is for a ScientificCalculator # package calculator; import java.math.*; //@author Hadisur Rahman public class ScientificCalculator extends javax.swing.JFrame { private boolean zerodisp; private boolean decdisp; private boolean dgrrad; private boolean sh; //sh means =shift private byte op; private double … | |
Hello to all! I made a small project using Netbeans8. I named my project smallCalcApp. And then i add a new JFrame File in my project and in that file I handled events of components which i put on form. When I run that file , it ran successfully and … | |
So I was recently at the big Motorola launch event which spanned New York City, Mexico City, Sao Paulo and London where I was part of the media herd waiting to see exactly what new handsets were about to be revealed. The answer came in triplicate: the Moto X Style, … | |
I'm trying to give access to client computer from my server and also tryin to revoke the granted access... the grant is successful but the revoking is not working please help. hms is the satabase that i want to give access to my clients.. my code try { Connection con … | |
this is a code for an input window that takes in data from users i tried to save whatever data the user put in in axml file but it is giving me errors...what is wrong with it...help /* * To change this license header, choose License Headers in Project Properties. … | |
I'm having trouble applying the javascript necessary to close one set of sub-menus when another set is opened. The tutorial site provided some demo code that works, but I can't get it to work without displaying all the various buttons to activate the other available skins. Up top is the … | |
Hello Everyone, I am experiencing errors when trying to compile a project in Java 8. The errors are caused by swing components. The code I am using is the following: import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class Main2 { public Main2(){ JFrame f = new JFrame (); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(100, … | |
Hello , Can anyone give me an efficient way to do Rect/Polygon filling as below/Attachment .   as of now I'm drawing lines & single pixel rectangles to do this and my application has slowed down so I'm looking for an alternative . This is an extension … | |
i have this code to make sodoko board with 9*9 cells(button cells ) but i cannot made all Jpanels contain my buttons i made the first Jpanel only import java.awt.Color; import java.awt.GridLayout; import java.lang.reflect.Field; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JButton; import javax.swing.JPanel; public class Sodoko extends JFrame { private Sodoko() … | |
I will be implementing MVC model in my program but before that, I have done a simple program based on my understanding of the MVC model. I have three pages: - The user will enter a value in page one and click the next button. - The value will be … | |
Hi All, I have a problem in my jdialog(child) and the parent frame is jframe,it is taking two events to close the jdialog,both from the close caption available at the upperright corner of the dialog,as well as from the button add where i have used dipose() to close on single … | |
my confirm button action listener is not printing the username and password even though I added a Actionlistener for it. please help thanks. Codes LoginDialog.java import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; @SuppressWarnings("serial") … | |
HI to all frndz! I have started learning Java and in a case study I have got some errors I have written a class address book and an error is occurring due to following code snipet persons.add(p); and the error message is: "Address Book has tried to run an unchecked … | |
Hi I am trying to move JTabbedPane down below top panel.I want it where the bottom panel begin.Thanks. import java.awt.*; import javax.swing.*; public class GridBagLayoutTest { JPanel bottomPanel; JPanel topPanel; public GridBagLayoutTest() { JFrame frame = new JFrame("GridBag Layout Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocationByPlatform(true); JTabbedPane tabbed=new JTabbedPane(); tabbed.add(bottomPanel,"One Way"); tabbed.setBounds(12, 200, 20, … | |
Hello All, I'm trying to write a simple html editor that will highlight tags, and it does, but if the user types the caret jumps to the very end of the document, how can I stop this from happening? here's my code: [CODE=java] import javax.swing.*; /** * Main frame for … | |
Hi I am creating a program in which I have 2 tabs. I want to make my tabs bigger in size so they can take whole panel space. Is there any way I can make both tabs size bigger. thanks import java.awt.*; import static java.awt.Font.BOLD; import java.awt.event.*; import java.awt.event.*; import … | |
Many of you probably have read about [Google's announcement](http://googlewebmastercentral.blogspot.com/2015/03/an-update-on-doorway-pages.html) on Doorway pages. Whether or not this ranking signal has come into full swing yet is debatable, but regardless, I'd prefer to be pro-active if anything occurs. For those of you who don't know what a Doorway page is, [VolumeNine did … | |
I read http://www.java2s.com/Code/Java/Swing-JFC/ProgressBarDemolongtask.htm on how to do a progress bar and up to now, I am still at a loss of how to implement one progress bar. say I have I have 4 functions that stores some random text into a text file -function a stores the text in textfile … | |
Hi i am trying to make taxi meter which shows the current price.Rightnow I have to click startmeter afterevery 1 minute than it's update the new price but I want it to update automatically once the price change after 1 minute instead of me pressing startmeter everytime.thanks for your help. … | |
Hi Guys I have a program thats supposed to generate 9 random objects made from lines and then allow me to save the panel showing the state of all 9 objects. Currently all 9 objects are being generated and when i click save the panel is being saved to a … | |
Hi I did a Simpletron program in GUI interface, but when I want to print the instructions in the window, it will not be as I want to. I used JGrasp to run the program and it just prints the instruction after each and not the way I wrote it … | |
Hi, I am getting this error and just can not figure out what is causing it. I have looked at code from 2 different books. I have google searched. Here is part of my program that contains the code giving me problems. I posted the program from the beginning to … | |
hello everybody ^^ I have to make a calander ,and to let the user to insert any event ! the calander it self is working <<but I don't know how can I write the code to give the user the ability to enter a new event by entering some fields … | |
So I'm building this pretty simple top trumps card game as part of an assignment. I have the game logic built, the swing GUI is in place and I plan to do all the calculation on the server app and have it update the client up with the game's state, … | |
** I was building a program that is supposed to paint an image in a JPanel. I should be able to select an image (such as a JPEG) from the Open item in the File drop down menu and then it should be visible in a new window. However, the … | |
I'm trying to make a program that removes all occurences of a specified string from a text file. I'm having trouble with tying in everything to make it work, so that the user is prompted to enter a string. This is what I've got: import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; … |
The End.