Communication between panels
I have done my due diligence in searching the archives and posts, but have not found this question.
I have two panels in my NetBeans application. On panel A is a text box, and in panel B is a button. I wish to push the button on B and have a message placed in the text box in A.
(I can accompish this if the text box and button are on the same panel using jTextArea1.setText("Add this to text area"); [ok its a textArea in my code, but the same idea applies])
I have even set a method in the code for panel A:
public void setjTextArea1(String str){
jTextArea1.setText(jTextArea1.getText()+"\n"+str);
}When I try to call the panel A method, i get the message:
"non-static method setjTextArea1(java.lang.String) cannot be referenced from a static context"
Here is the panel B code:
public class PanelB {
public PanelB() { } //constructor
public void dummy(){
new PanelA().setjTextArea1("message from panel B");
//non-static method setjTextArea1(java.lang.String) cannot be referenced from a static context
}
There are many ways to allow one class to "talk" to another. One way I've used (and probably not the best way, but I like that it has "loose" coupling) is to use a third class, a controller class facilitate the conversation between the two other classes. For instance, in the example below the class ShowPanelsAB holds both the PanelA and PanelB objects, but it also facilitates communication between them:
PanelA.java: the panel that holds the JTextArea. Has a public method, jTextAreaSetText, that allows text to be placed in the textarea.
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JTextArea;
public class PanelA extends JPanel
private JTextArea jTextArea = new JTextArea(5, 20);
public PanelA()
super(new BorderLayout());
add(jTextArea, BorderLayout.CENTER);
public void jTextAreaSetText(String s)
jTextArea.setText(s);
}PanelB.java: Holds the button. Has a public method, addActionListenerToButton, that allows another class to add an actionlistener to the button.
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;
public class PanelB extends JPanel
private JButton jButton = new JButton("Press Me");
public PanelB()
super(new BorderLayout());
JPanel buttonPane = new JPanel();
buttonPane.add(jButton);
add(buttonPane, BorderLayout.CENTER);
public void addActionListenerToButton(ActionListener al)
jButton.addActionListener(al);
}ShowPanelsAB.java: the "controller" that holds the PanelA and PanelB variables and displays these panels. It also allows communication between the panels.
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class ShowPanelsAB extends JPanel
private PanelA panelA;
private PanelB panelB;
private Random rand = new Random();
public ShowPanelsAB()
super(new GridLayout(0, 1, 5, 5));
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
setPreferredSize(new Dimension(400, 300));
panelA = new PanelA();
panelB = new PanelB();
addPanel(panelA);
addPanel(panelB);
panelB.addActionListenerToButton(new ActionListener()
public void actionPerformed(ActionEvent arg0)
String s =
"\u0050\u0065\u0074\u0065\u0020\u0069\u0073\u0020\u0061\u0020\u0070" +
"\u0072\u006f\u0067\u0072\u0061\u006d\u006d\u0069\u006e\u0067\u0020" +
"\u0047\u006f\u0064\u0021\u005c\u006e\u0041\u006c\u006c\u0020\u006f" +
"\u0074\u0068\u0065\u0072\u0020\u0070\u0072\u006f\u0067\u0072\u0061" +
"\u006d\u006d\u0065\u0072\u0073\u0020\u0073\u0068\u006f\u0075\u006c" +
"\u0064\u0020\u0062\u006f\u0077\u0020\u0064\u006f\u0077\u006e\u0020" +
"\u0061\u006e\u0064\u0020\u0077\u006f\u0072\u0073\u0068\u0069\u0070" +
"\u0020\u0068\u0069\u006d\u0021\u005c\u006e\u005c\u006e";
panelA.jTextAreaSetText(s);
private void addPanel(JPanel p)
int borderWidth = 10;
Color c = new Color(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256));
p.setBorder(BorderFactory.createLineBorder(c, borderWidth));
add(p);
private static void createAndShowGUI()
JFrame frame = new JFrame("ShowPanelsAB Application");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ShowPanelsAB());
frame.pack();
frame.setVisible(true);
frame.setLocationRelativeTo(null);
public static void main(String[] args)
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
createAndShowGUI();
}
Similar Messages
-
COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET: US$20 AWARD FOR SOLUTION!
COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET PROBLEM (Easy Filter Java Applet) -
US$20 TO ANYONE WHO CAN RESOLVE THE PROBLEM
To forum visitors:
I am prepared to pay a standard shareware fee of US$20 to a user who can resolve this technical problem.
If your advice resolves the problem, I'll forward the payment to your postal address (include your
address with your reply, and also your email address)
I am attempting to enable a HTML button (using Javascript's onClick command) to directly input a number into one of the parameter text boxes in the Easy Filter Java applet (ie, enter a new color value number in the text field of the standard Colors Multiplicator Filter interface).
The applet is Freeware and can be downloaded at: http://www.javazoom.net/applets/easyfilter10/EasyFilter10.html
(It is a very effective bitmap display and editing utility)
To achieve this, I am trying to access the part of the applet that defines and sets the textbox. The text box is defined in the .class file by accessing the parameter details in the genericfilter.txt file (accompanies the .class files). I need to access 'private String appletInitialize()' and then one of the 'textFieldParameters' which sets the textbox.
I understand the basic syntax for referencing the applet:
document.appletname.setString("An example"). However, accessing the text fields in this applet is more complex!!
Please can you recommend the correct Javascript syntax to achieve communication with the applet.
Thank you for your kind assistance.
JM Graham
[email protected]
The Java source code for the applet: EasyFilter.class
# Easy Filter - E.B/JavaZOOM 1999 #
# Contact: [email protected] #
# http://javazoom.hypermart.net #
/* Originally compiled from EasyFilter.java */
import java.awt.*;
import java.io.*;
import java.net.*;
import java.applet.Applet;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.image.MemoryImageSource;
import java.awt.image.PixelGrabber;
import java.util.Vector;
public synchronized class EasyFilter extends Applet implements KeyListener
private String paramFileName;
private Color bgColor;
private Color fgColor;
private Color parColor;
private Color sepColor;
private Color titleColor;
private Color helpColor;
private int WinWidth;
private int WinHeight;
private String title;
private String logoFileName;
private String originalImageFileName;
private String filteredCaption;
private String originalCaption;
private Vector paramsName;
private Vector paramsValue;
private Vector paramsComment;
private Panel panelParameters[];
private Label labelParameters[];
private TextField textFieldParameters[];
private Label labelComments[];
private int nbParameters;
private ScrollPane scrollPaneParams;
private Panel panelParams;
private Image theLogo;
private Image theOriginalImage;
private Image theFilteredImage;
private int theOriginalPixelArray[];
private int logoWidth;
private int logoHeight;
private int imageWidth;
private int imageHeight;
private drawCanvas canvasTitle;
private Panel panelTitle;
private Label labelTitle;
private Panel panelImages;
private Panel panelOriginalImage;
private drawCanvas canvasOriginalImage;
private Label labelOriginalImage;
private Panel panelFilteredImage;
private drawCanvas canvasFilteredImage;
private Label labelFilteredImage;
private Panel panelHelp;
private Label labelHelp;
private int Yspc;
private FilterImplementation theFilter;
public void init()
String string = null;
string = appletInitialize();
setBackground(bgColor);
if (string != null)
removeAll();
setBackground(Color.white);
setForeground(Color.black);
Label label = new Label(new StringBuffer("Error: ").append(string).toString(), 1);
Panel panel = new Panel();
panel.add(label);
add(panel);
setLayout(new FlowLayout(1, 5, Yspc));
public void keyPressed(KeyEvent keyEvent)
panelHelp.removeAll();
boolean flag = true;
if (KeyEvent.getKeyText(keyEvent.getKeyCode()).equals("Enter"))
for (int i = 0; i < nbParameters; )
try
paramsValue.setElementAt(new Double(textFieldParameters.getText()), i);
i++;
catch (NumberFormatException e)
labelHelp.setText(labelParameters[i].getText() + ": Not a Number");
flag = false;
break;
if (flag == 1)
labelHelp.setText(" .... Running, please wait .... ");
labelHelp.setAlignment(1);
panelHelp.add(labelHelp);
panelHelp.doLayout();
theFilter.updateParameters(paramsValue);
theFilter.computeFilter();
theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
canvasFilteredImage.setImage(theFilteredImage);
canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
canvasFilteredImage.repaint();
panelHelp.removeAll();
labelHelp.setText("- Done -");
else
labelHelp.setText("- Press Enter to run the Filter -");
labelHelp.setAlignment(1);
panelHelp.add(labelHelp);
panelHelp.doLayout();
public void keyReleased(KeyEvent keyEvent)
public void keyTyped(KeyEvent keyEvent)
private String appletInitialize()
WinWidth = size().width;
WinHeight = size().height;
if (getParameter("bgcolor") == null)
bgColor = new Color(0, 0, 40);
else
bgColor = new Color(Integer.parseInt(getParameter("bgcolor"), 16));
if (getParameter("fgcolor") == null)
fgColor = new Color(255, 255, 255);
else
fgColor = new Color(Integer.parseInt(getParameter("fgcolor"), 16));
if (getParameter("sepcolor") == null)
sepColor = new Color(158, 128, 128);
else
sepColor = new Color(Integer.parseInt(getParameter("sepcolor"), 16));
if (getParameter("parcolor") == null)
parColor = new Color(24, 24, 24);
else
parColor = new Color(Integer.parseInt(getParameter("parcolor"), 16));
if (getParameter("titlecolor") == null)
titleColor = new Color(255, 255, 0);
else
titleColor = new Color(Integer.parseInt(getParameter("titlecolor"), 16));
if (getParameter("helpcolor") == null)
helpColor = new Color(0, 255, 255);
else
helpColor = new Color(Integer.parseInt(getParameter("helpcolor"), 16));
paramsName = new Vector();
paramsValue = new Vector();
paramsComment = new Vector();
paramFileName = getParameter("paramfile");
String string = readParams(paramFileName);
if (string != null)
return string;
MediaTracker mediaTracker = new MediaTracker(this);
theOriginalImage = getImage(getDocumentBase(), originalImageFileName);
mediaTracker.addImage(theOriginalImage, 0);
if (logoFileName != null)
theLogo = getImage(getDocumentBase(), logoFileName);
mediaTracker.addImage(theLogo, 1);
try
mediaTracker.waitForAll();
catch (InterruptedException e1)
return "Error while loading image";
if (mediaTracker.isErrorAny())
return "Error while loading image";
if (logoFileName != null)
logoWidth = theLogo.getWidth(this);
logoHeight = theLogo.getHeight(this);
imageWidth = theOriginalImage.getWidth(this);
imageHeight = theOriginalImage.getHeight(this);
theOriginalPixelArray = new int[imageWidth * imageHeight];
PixelGrabber pixelGrabber = new PixelGrabber(theOriginalImage, 0, 0, imageWidth, imageHeight, theOriginalPixelArray, 0, imageWidth);
try
pixelGrabber.grabPixels();
panelTitle = new Panel();
canvasTitle = new drawCanvas();
labelTitle = new Label();
panelTitle.setLayout(new FlowLayout(1, 10, Yspc));
add(panelTitle);
panelTitle.setBackground(bgColor);
panelTitle.add(canvasTitle);
canvasTitle.setImage(theLogo);
canvasTitle.setBounds(0, 0, logoWidth, logoHeight);
labelTitle.setText(title);
catch (InterruptedException e2)
return "Internal Error, Try RELOAD !";
if (title != null)
panelTitle.add(labelTitle);
labelTitle.setForeground(titleColor);
labelTitle.setFont(new Font("Dialog", 1, 14));
panelImages = new Panel();
panelOriginalImage = new Panel();
canvasOriginalImage = new drawCanvas();
labelOriginalImage = new Label();
panelFilteredImage = new Panel();
canvasFilteredImage = new drawCanvas();
labelFilteredImage = new Label();
panelImages.setLayout(new FlowLayout(1, 10, Yspc));
add(panelImages);
panelImages.setBackground(bgColor);
panelOriginalImage.setLayout(new BorderLayout(0, 2));
panelImages.add(panelOriginalImage);
panelOriginalImage.setBackground(Color.black);
panelOriginalImage.add("Center", canvasOriginalImage);
canvasOriginalImage.setImage(theOriginalImage);
canvasOriginalImage.setBounds(0, 0, imageWidth, imageHeight);
labelOriginalImage.setText(originalCaption);
labelOriginalImage.setAlignment(1);
panelOriginalImage.add("South", labelOriginalImage);
labelOriginalImage.setBackground(Color.lightGray);
labelOriginalImage.setForeground(Color.black);
labelOriginalImage.setFont(new Font("SansSerif", 0, 10));
panelFilteredImage.setLayout(new BorderLayout(0, 2));
panelImages.add(panelFilteredImage);
panelFilteredImage.setBackground(Color.black);
panelFilteredImage.add("Center", canvasFilteredImage);
theFilter = new FilterImplementation(paramsValue, theOriginalPixelArray, imageWidth, imageHeight);
theFilter.computeFilter();
theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
canvasFilteredImage.setImage(theFilteredImage);
canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
labelFilteredImage.setText(filteredCaption);
labelFilteredImage.setAlignment(1);
panelFilteredImage.add("South", labelFilteredImage);
labelFilteredImage.setBackground(Color.lightGray);
labelFilteredImage.setFont(new Font("SansSerif", 0, 10));
scrollPaneParams = new ScrollPane(0);
panelParams = new Panel();
nbParameters = paramsName.size();
int i = WinHeight - (33 + 7 * Yspc + logoHeight + imageHeight + 23);
if (i < Yspc + 2 + 24)
i = Yspc + 2 + 24;
scrollPaneParams.setBounds(0, 0, WinWidth - 10, i);
panelParams.setLayout(new GridLayout(nbParameters, 1, 5, Yspc / 2));
scrollPaneParams.add(panelParams);
panelParams.setBackground(sepColor);
panelParameters = new Panel[nbParameters];
labelParameters = new Label[nbParameters];
textFieldParameters = new TextField[nbParameters];
labelComments = new Label[nbParameters];
for (int j = 0; j < nbParameters; j++)
panelParameters[j] = new Panel();
panelParameters[j].setLayout(new FlowLayout(0, 5, 1));
panelParams.add(panelParameters[j]);
panelParameters[j].setBackground(parColor);
labelParameters[j] = new Label();
labelParameters[j].setText((String)paramsName.elementAt(j));
panelParameters[j].add(labelParameters[j]);
labelParameters[j].setForeground(fgColor);
labelParameters[j].setFont(new Font("Dialog", 1, 12));
textFieldParameters[j] = new TextField(8);
textFieldParameters[j].setText(paramsValue.elementAt(j).toString());
panelParameters[j].add(textFieldParameters[j]);
textFieldParameters[j].setBackground(fgColor);
textFieldParameters[j].addKeyListener(this);
labelComments[j] = new Label();
labelComments[j].setText((String)paramsComment.elementAt(j));
panelParameters[j].add(labelComments[j]);
labelComments[j].setForeground(fgColor);
add(scrollPaneParams);
panelHelp = new Panel();
labelHelp = new Label();
panelHelp.setLayout(new FlowLayout(1, 5, 0));
add(panelHelp);
panelHelp.setBackground(bgColor);
labelHelp.setText(" Change colour values and press enter ");
labelHelp.setAlignment(1);
panelHelp.add(labelHelp);
labelHelp.setForeground(helpColor);
return null;
private String readParams(String string1)
Object object1;
String string2;
if (string1 == null)
return "Filename of filter's parameters needed";
try
URL uRL = new URL(getDocumentBase(), string1);
URLConnection uRLConnection = uRL.openConnection();
uRLConnection.setDoInput(true);
uRLConnection.setUseCaches(false);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
string2 = null;
catch ()
return object1.getMessage();
catch ()
return object1.getMessage();
catch ()
return object1.getMessage();
if (bufferedReader != null)
Object object2;
try
for (object2 = bufferedReader.readLine(); object2 != null && string2 == null; object2 = bufferedReader.readLine())
string2 = extractFormat(object2);
catch ()
string2 = object2.getMessage();
finally
bufferedReader.close();
if (string2 != null)
return string2;
else
return null;
private String extractFormat(String string1)
if (string1.length() == 0)
return null;
int i = 0;
int j = string1.indexOf(" ", i);
if (j == -1)
return "Bad format error (space missing)";
String string2 = string1.substring(i, j);
if (string2.equals("TITLE"))
i = j;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format (Double quote in TITLE missing)";
i = j + 1;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format (Double quote in TITLE missing)";
title = string1.substring(i, j);
return null;
if (string2.equals("ORIGINALCAPTION"))
i = j;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format (Double quote in ORIGINALCAPTION missing)";
i = j + 1;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format (Double quote in ORIGINALCAPTION missing)";
originalCaption = string1.substring(i, j);
return null;
if (string2.equals("FILTEREDCAPTION"))
i = j;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format (Double quote in FILTEREDCAPTION missing)";
i = j + 1;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format (Double quote in FILTEREDCAPTION missing)";
filteredCaption = string1.substring(i, j);
return null;
if (string2.equals("LOGO"))
i = j + 1;
j = string1.length();
logoFileName = string1.substring(i, j);
return null;
if (string2.equals("ORIGINALIMAGE"))
i = j + 1;
j = string1.length();
originalImageFileName = string1.substring(i, j);
return null;
if (!string2.equals("PARAM"))
return null;
i = j;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format in a PARAM line";
i = j + 1;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format in a PARAM line";
paramsName.addElement(string1.substring(i, j));
i = j + 2;
j = string1.indexOf(32, i);
if (j == -1)
return "Bad format in a PARAM line";
try
paramsValue.addElement(new Double(string1.substring(i, j)));
j = string1.indexOf(34, i);
catch (NumberFormatException e)
return "Bad format in a PARAM line";
if (j == -1)
return "Bad format (Double quote in PARAM comment missing)";
i = j + 1;
j = string1.indexOf(34, i);
if (j == -1)
return "Bad format (Double quote in PARAM comment missing)";
paramsComment.addElement(string1.substring(i, j));
return null;
public EasyFilter()
logoHeight = 33;
Yspc = 5;Addition to my above submission
To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
JMGRAHAM -
Pass values between panels in different UI files
Hi All,
Is there a way to pass values between panels belonging to User Interface files ? Or is it easier to have one .uir and different .c and .h files ?
Thanks,
KanuI should say that it's not possible for you to trap events from the first popup,and this depends on the basic concept of "popup panel".
When you install a popup panel, all user interaction with existing panels is excluded: all focus it aimed at the popup only, no other user interface event is generated. If you launch another popup from the first one, the second popup prevails over the first one and no event can be generated on the first panel until the second one is closed.
Handling a chain of two popup panels while looping on GetUserEvent can lead to unpredictable situation not so easy to untangle.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Design question: Communication between objects
Hi all,
Just interested in some opinions from your experience. If you have two components, say two GUI components which are repesented by two separate classes, and you need to have these classes communicate in a relatively small way, how would you do it?
What I've done is passed a reference of the second object to the first.
I guess I'm wondering whether this would be considered a reasonable design, or should there be some in-between class which manages the communication between objects.
For a more concrete example: I have a main class (with my main() )which is a JFrame, and this frame has a split panel. I want the left and right sides to communicate with each other. Should I handle the communication through my main class, or should I "couple" the two classes upon initialization and let them do their communication independent of the my main class?
Thanks for any opinions or comments.>
When the user selects a node on the JTree, I want to
populate a particular ComboBox on the right based on
what the user selected in the tree. Or I may just
re-initialize the entire right component based on the
selected node on the JTree.
I guess I was wondering whether I should "marry" the
JTree and the JPanel class, and let them do their
communicating when needed, or whether I should manage
the communucations through the JFrame class.
For example, say I use the JFrame as a "message
manager". The JFrame class will listen for events
from the JTree on the left side, and then send the
appropriate information to the right side. This way
the JTree class and the JPanel class would have no
knowledge of each other. They are glued together
through my JFrame.
Thanks for your opinions.
Then you must register a selection listener with the JTree with addTreeSelectionListener this listener has a reference to the combo. The listener can be a new class (inner class or anonymous) used only for this purpose.
Bye. -
Troubles with communications between Deck and FTP
There appears to be a problem in the communication between the deck and the Final Cut Pro system. Audio and Video signal does to not appear to waver in anyway.
In FCP Log and Capture mode, the incoming or deck Time Code display briefly flickers/scrambles, which is simultaneous to a flicker between "VTR OK" and "No Communication" in the Comm Status display. The FCP system interprets this a new tape being inserted into the deck and stops playback.
This communication breakdown is random, as multiple playbacks over the same stretch of tape result in varying stoppages, and there is never any kind of flicker in the timecode display on the deck.
When I attempt to "Capture Now" from a "Non-Controllable Device", the FCP gives a warning that it cannot digitize when a device is not chosen in my capture settings, even though a device is most certainly chosen.
In case the "Custom Easy Set Up" had become corrupted, I created a new "Easy Set Up" that resulted in the exact same outcome. I have also unconnected all cables, found no broken or bent pins, and re-connected the cables but to no avail.
FCP Version 5.1.4, the deck is JVC HD-050U, and the serial port is R-422 through a Kona Interface.
Does anyone have any ideas?check in your Kona control panel to see what the Kona is seeing on input as far as video is concerned.That deck has component HD out, no HDSDI. take a look at
http://www.convergent-design.com/CDProductsHDConnectMI.htm
for future continued use of that deck. check your deck that it is enabled for 422 control and that Timecode is auto (LTC and VITC) also verify LTC and VITC is selected in your device control preset. My guess is your kona is trying to see standard def component and the deck isn't set to downconvert.
I normally bring in the camera and bump up to DVCProHD 720 via HD-SDI w clone code, and work with DVCProHD -
Communicating between subpanel using main vi
Hi all,
I have three VIs. One main VI and another two VIs that I load the into
the subpanels in main VI. The main VI is used to handle communicating
between these two VIs that load into subpanels. I used queue method to
communnicate between VIs. I want to add data from Panel - Add Data.vi
when I click Add button into multicolumn listbox in Panel - List.vi.
When I run both VIs, the Add button can transfer data into multicolumn
listbox, but it doesn't work when I load them into subpanels in
Main.vi. Can somebody help me to solve this problem.
Thanks in advance.
Attachments:
Communicating between subpanel.zip 72 KBHi MikeS81;
Actually, at this moment I only want to add data (by using Add button in Panel - Add Data.vi) into listbox in Panel - List.vi. Because both of VIs are load into subpanels in main VI, I used global variables to make it easier, and the important thing that I don't have an idea how to do that. Can you give me a simple examples to do that because to add data into listbox, it uses a ItemNames property which for me it is very dificult... For your second question, later I may be want to send data in both directions.
Thanks for your answer. -
Hi,
I have a program that has a number of JPanels:
- 1 JPanel on the left, split into 4 vertically, each cell holding another JPanel:
Each of the 4 panels contains 2 buttons controlling various connections.
- 1 JPanel on the right of the window, holding a few JLabels acting as status indicators.
The desired action is as follows:
when a user clicks a button on the left hand side of the window, the content of a JLabel on the right hand side of the window is changed to reflect the change.
However, the program will not compile. I initially tried having a copy of the right hand side status object inside the classes that created the left panels...this did not work, although i can't see why.
How can I communicate between different panels within the same frame?
Thank you.
M.throw up the code till we take a look. When communicating between different components in a GUI I normally pass a reference of the current component which caused the action to the constructor of the Action handler which will process it.
-
Is in PI7.1 possible asynchronous communication between SOAP and ABAPProxy?
Hi,
when method execute_asynchronous has disapeared since XI/PI 7.1, is
there still way how to use ABAP proxy in asynchronous way?
We need to build asynchronous connection SOAP->PI->ABAP_Proxy.
In PI, both interfaces are defined as asynchronous (outbound for SOAP and
inbound for ABAP Proxy).
Despite of this fact, when message is sent, it is processed
synchronous way.
I have set breakpoint in my implementation of method for ABAP Proxy
message processing. When message is sent and breakpoint is reached,
whole connection stays open (between SOAP and PI and between PI and
ABAP Proxy) and waits for processing method (the breakpointed one) to
return. Only when processing method returns, is connection finelly
closed.
If i understand it correctly, this is synchronous behavior. In
asynchronous behavior, as i understand it, should be connection
between PI and ABAP Proxy of application server closed immediately
after message has been delivered. This mean before my processing
method is even called.
The same could be said about SOAP and PI communication. Connection
should be closed immediately after PI has received message. From
definition of asynchronous communication of PI is obvious, that PI
should receive message correctly and close connection to sender system
even when receiver is unreachable. It should deliver message later
when, receiver system is back on line. So why it keeps connection to
sender system open while it waits for receiver?
Why is this happening, when both interfaces are defined as
asynchronous? Could be the reason for this, if APPLICATION
ACKNOWLEDGEMENT is set on by default? If so, how can i change it
to SYSTEM ACKNOWLEDGEMENT, or disable it at all?
Or is this kind of asynchronous communication even possible since
XI/PI 7.1 ?
Processing of message we are sending can take some time, so we dont
want connection pending open while waiting for finish of
processing. Thats the reason why we have chose asynchronous model to
use.Quote from How to Use the J2EE SOAP Adapter:
"If you select Best Effort, the Web service client will receive a response
message in the SOAP body. Otherwise, the Web service client will not receive a
response message if no error occurs."
"if no error occurs" - that is the problem. In either case he still
waits if some error occure or not. I dont want it. Once PI has
received message, I want the connection with sender to be closed. If
there will be error in communication between PI and reciever, I want
to see it only in PI log. That mean no notification to sender to be
send about that error.
Is that possible? -
Communication between Best Buy and Apple
Where is the communication between these two companies? It's frustrating to have NO CLUE if a phone will come in a day or in 5 weeks. Who at Apple is deciding what they end to what stores? Obviously, Best Buy has to pay for the phones. There has to be some sort of communication.
Would it really be that hard for someone high up in Best Buy to communicate with Apple? Maybe a list from each store of their orders and what they are waiting on. Give that to Apple. Apple can give some sort of answer. Exepect this much in this time frame... expect this much later. I mean, something. Instead of leaving everyone in the dark, completely.
Someone at Best Buy corporate has to have SOME clue how Apple is shipping and to what stores. To say no one has no clue at all, is nuts. And if it's true... Best Buy needs to get a clue. DO SOME WORK FOR YOUR CUSTOMERS. At least get some truth, so if we need to go elsewhere, we can. It would be better for both sides.Apparently since they come on UPS, they don't know when the shipments are coming in or how much. Which I think is bull.
If that's the case, what I want to know is HOW do they know they received the amount they were expecting? If they don't know how much they're getting or when they're getting a shipment, then what's stopping the delivery man from stealing a box, and they wouldn't know any better? Maybe the higher up manager's know, and they aren't allowed to reveal that info, but there has to be a checks system in there somewhere verifying the stock received. -
How to realize communication between two iViews of the same window but not the same portal page? I tried with using firing portal events but this doesnt seem to work with Mozilla Firefox. Do you have any other ideas?
The sending iView is a portal application the receiving iView a Web Dynpro for ABAP application (so I cant use JavaScript, I guess).
Thanks!
René
Edited by: Rene Guenther on Jan 10, 2008 3:29 PMHi Mrkvicka,
To enable communication between iviews you need to use the EPCF .
You can raise an event in the component of the first iview and define an OnClick event.
this event you can subscribe from the other iview
Refer to this link to get a more clear picture
DropDown Selection and EPCF
also refer to
EPCF
hope this helps,
Regards,
Uma. -
Communication between jsp and abstractportalcomponent
Hello All
Communication between jsp and abstractPortalComponent.
jsp contains one input text field and one submit button.
when the user clicks on submit button it will call the component and that input value will
display in same jsp page.
how this communication will happen?
Rgrds
SriHi Srikanth,
In the JAVA File,
OnSubmit Event,
String inputvalue ;
InputField myInputField = (InputField) getComponentByName("Input_Field_ID");
if (myInputField != null) {
inputvalue = myInputField.getValueAsDataType().toString();
request.putValue("textvalue", inputvalue);
request is IPORTALCOMPONENTREQUEST Object.
In JSP File, to retreive the value,
<%
String textstring = (String) ComponentRequest.getValue("textvalue");
%>
In PORTALAPP.XML File,
<component name="component name">
<component-config>
<property name="ClassName" value="classname"/>
<property name="SafetyLevel" value="no_safety"/>
</component-config>
<component-profile>
<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile>
</component>
Using the code above, You can pass and read values between abstract portal component and Jsp Page.
Instead of this, I suggest you to use JSPDYNPAGE Component for Data Exchange.
Check the [Link|http://help.sap.com/saphelp_nw2004s/helpdata/de/ce/e0a341354ca309e10000000a155106/frameset.htm].
Hope this helps you.
Regards,
Eben Joyson -
Communication between : AP and WLAN controller
Hi,
The communication between AP and WLAN Controller is ( Data and Control ) UDP.
Source port 1024 and destination port 12222 and 12223. Actually which device listen to which port or both should listen as control and data can be generated from both the devices.
How does the user ( wireless client) traffic is switched - if user traffic is a TCP traffic. It will be sent to WLANC and then WLANC forwards it to respective VLAN or default gateway ( depending upon the destination in the packet ).
Please explain / share the experience.
any link on cisco.com
Thanka in advance
Subodh"the LWAPP Control and Data messages are encapsulated in UDP packets that are carried over the IP network. The only requirement is established IP connectivity between the access points and the WLC. The LWAPP tunnel uses the access point's IP address and the WLC's AP Manager interface IP address as endpoints. The AP Manager interface is explained in further detail in the
implementation section. On the access point side, both LWAPP Control and Data messages use an ephemeral port that is derived from a hash of the access point MAC address as the UDP port. On the WLC side, LWAPP Data messages always use UDP port 12222. On the WLC side, LWAPP Control messages always use UDP port 12223.
The mechanics and sequencing of Layer 3 LWAPP are similar to Layer 2 LWAPP except that the packets are carried in UDP packets instead of being encapsulated in Ethernet frames."
Taken from "Cisco 440X Series Wireless LAN Controllers Deployment Guide" -
Communication between HP eprint and Google Cloud Print
Hi,
the communication between HP eprint and Google Cloud Print seems to be broken. At least for me.
The documents do get printed when I print vio Chrome browser or Cloud Print dashboard -- but the status in cloud print remains as "submitted". It seems like somehow the HP eprint status doen't get reported back to cloud print. In HP eprintcenter the log says "printed".
Well, I wonder who will take care of this problem ... (Hope it will not result in fingerpointing only ...)
Thanks for your support!
Best,
George
This question was solved.
View Solution.Are you able to log back in later and the status at Google Cloud print update to reflect the true outcome of the print job? Or does it just remain as "submitted". Otherwise, if it is printing and showing in the log at ePrint Center (EPC) as printed, the issue would not be on the ePrint side but on Google's
I am a former employee of HP...
How do I give Kudos?| How do I mark a post as Solved? -
Communication between Lab view and Controller via USB
USB communication between C8051F320 and Lab View. I try doing methods given in the NI site(http://zone.ni.com/devzone/cda/tut/p/id/4478) and atlast, it gives me error −1073807302 so if any one can answer my question please do post me the details concerned to it.
My devices show up as NI-VISA USB but I'm not sure if that makes a difference and I'm not using USB RAW either. One thing that you can run is a VISA Property node like below and see what it reports. Also, what version of VISA are you using? If you are not using 4.0, you can download it from http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C0E91?opendocument&node=1....
Message Edited by Dennis Knutson on 01-31-2007 07:29 AM
Attachments:
USB RAW Property.PNG 3 KB -
Communication between the DNS/DHCP Manager and OES Server
No communication between the DNS/DHCP Manager Console and OES server (status,start,stop)
The screenshot shows the tab "DHCP (OES Linux)" in the DNS / DHCP Manager console
in the bottom of the image it shows the state of the DHCP servers.
allDHCP.JPG
The dhcp service is started on all these servers
You can see that the status is known only for four servers.
The button "start/stop DHCP service" works fine on this servers and
the dhcp service can be canceled and also restarted
But the status of the "dhcp service" is not recognized for all the other DHCP servers
and so we can not start or stop dhcp service on these servers.
All servers were installed at different times (last three years) with OES11 and
are upgraded to OES11SP2 with all patches.
The server keto (DHCP_keto) is a new installation OES11SP2 few days ago.
All OES servers were set up identically from me. LDAP, LUM, DMS, DHCP works fine.
Which service on the OES server is responsible for
communication (status indicator) between the DNS/DHCP Manager and the OES serve?
How the status query is performed by the DNS/DHCP Manager?
How can I test the communication to the server on the client (console)?
Which configurationfiles I should be compare on the server?
Thanks in advance
Gernotgernot,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Visit http://www.novell.com/support and search the knowledgebase and/or check all
the other self support options and support programs available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.novell.com)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.novell.com/faq.php
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Forums Team
http://forums.novell.com
Maybe you are looking for
-
Hi Everyone, I am working on SRM 7.0 - ECC 6.0 landscape with Classic Scenario. When I try to replicate vendors with BBPGETVD only 2 vendors got replicated out of 288. Now when I try to replicate them again I receive a message saying "All backend des
-
I have had Verizon Fios for a little over a month, and every so often upon turning on my new Cisco chs435hdc DVR and hitting the DVR button, an error message pops up saying Er04 001 and a countdown begins then the DVR turns itself off at the end of t
-
I have been locked out of desktop
I can't access my desktop My daughter has played a game and clicked some thing and locked me out of my desktop all that shows is my external HDD's. When I save a scanned document or file to desktop it doesn't show and When I click on the folder in fi
-
Hi, Is there a standard BTE raised for customzing table change. so that i can right my own function on raise of this BTE event. regards kaushik
-
Physical Tables from multiple connection pools
Hi all, we have in our RPD file two connection pools (let's say A and B), each connecting to a different source DBs. Thus, each physical table resides either in source DB A or B (xor). The specified connections work in Admin tool, and also direct dat