This is a result of ActionListener. Depending on what he chooses in the Combo Box it returns a price. I just want it as a simple $39.99. Nothing more.
I have the
packageIndex = packageChoice.getSelectedIndex();
All the prices are in an array:
String[] prices = {"49.99, 39.99, 34.99, 99.99"}
Now I need to know how to pull the pr...
Coded for a checkbox that agrees to the Terms of Service and an accept and decline button.
I need help for an exception handling that
if the user does NOT have the checkbox as SELECTED then when they hit accept, an error message occurs telling the user that he has not selected the checkbox.
How would I code an error handling except...
This is making me very angry, I have worked on this for 2 days, have 2 books open and have looked through them, and STILL can't get this program to run the way I want it run. I'm getting to the point where if this doesn't help, I quit.
I want a SIMPLE Frame application.
It has a JComboBox centered at the top.
Next to it is a text field...
Depending on what they choose in the JComboBox I want the JList to show different strings, not sure how to repopulate a JList though. When searching through the API, still found nothing.
Any idea on how you might code this?
Im using NetBeans by the way for reference.
...
I have a Devexpress Gridview that is linked to a delete, fetch and update stored procedure. The problem I am having is that when I run my program, select a row in the grid and press delete it fires the event multiple times. Specifically it deletes the selected row and then I re-fetch the data so the focus returns to the first row. Which ...
I am creating a custom JPanel element (a login form).
I want to allow people who use my panel to subscribe/listen to an event called "loginSuccessful".
What is the best way to implement this in my JPanel object?
UPDATE: oh and i also want to add that when that action is triggered, i also want to return a "User" object containing the ...
I have an action listener set up on my main jframe menu for the buttons listed on it, and they work fine, bringing up other jframes as needed. The problem is when a person clicks the buttons on the jframes brought up I get a nullexception after a jbutton is clicked on that submenu jframe.
Example code:
public class main extends JFrame...
Hello,
I am trying to make a GUI in Java, using something along these lines:
public class GUIApp
{
DrawingPanel dp;
buttonPanel bp;
ova = Oval;
public GUIApp()
{
JFrame win = new JFrame("Drawing App");
dp = new DrawingPanel();
bp = new buttonPanel(this);
//Settings for panels and frame
...
I've developed custom ActionListener:
public class SecureActionListener extends ActionListenerImpl implements ActionListener {
private ActionListener _delegate;
public SecureActionListener(ActionListener delegate) {
_delegate = delegate;
}
@Override
public void processAction(ActionEvent actionEvent) {
...
I've noticed that JSF 1.2. does not return error page when an exception was thrown in actionListener method but does return error page when an exception was thrown in action method. Why is that? Can it return error page in both cases?
...
I have a program that get's input string with file path in one JTextArea and then loads it's content to a second JTextArea. Problem is that when using JTextArea I cannot add an actionListener that will load content in the second JTextArea when leaving this field. How to get around this problem ?
protected JTextArea inputField, outputFie...
What is the difference between action and actionListener. When sould I use action and/or actionListener? My question is related JSF 2.0.
...
hi guys, i'm having small problems in calling variables and changing the variables after the user hit the change button. i'm new here trying to learn Jave , hope you can help.
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class NestedPanelsTwo {
private J...
Hi!
I moved from JSF 1.2 to JSF 2.0 and it seems I missed something during the switch. I have following scenario:
There is a button on one page with actionListener set to one managed bean's method which adds an object to request by calling FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("foo", fooObject);
Na...
I just want to print the selected option in the combo box, to a textfield. Please explain what's wrong because i have to complete it & explain it in class. Any help would be greatly appreciated. Thanks in advance.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class App3 extends JFrame implements ActionListen...