Window inside another window
Hey!
i'm having problems with a window i created inside another window, when i click the "x" for exit in the 2nd window, both windows close!!
how can i fix this??
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class Window_2 extends JFrame{
Label nombre, apellido;
TextField txNombre, txApellido;
Button ok;
Panel Pnl, PnlNombre, PnlOk;
public Window_2() {
Pnl= new Panel();
Pnl.setLayout(new GridLayout(2,1));
PnlNombre= new Panel();
PnlNombre.setLayout(new GridLayout(2,2));
PnlOk=new Panel();
PnlOk.setLayout(new GridLayout(1,1));
nombre= new Label("Nombre");
txNombre= new TextField(10);
apellido= new Label("Apellido");
txApellido= new TextField(10);
ok= new Button("OK");
PnlNombre.add(nombre);
PnlNombre.add(txNombre);
PnlNombre.add(apellido);
PnlNombre.add(txApellido);
PnlOk.add(ok);
Pnl.add(PnlNombre);
Pnl.add(PnlOk);
add(Pnl);
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
setVisible(false);
dispose();
}
Similar Messages
-
Box inside another box in SMARTFORM for hierarchical item data printing
Hi All,
I need to put a <b>box inside another box</b> and <b>both the boxes need to be bordered</b>. There are 2 levels of main data to be printed in the 2 boxes. Header data will be printed in the outer box and corresponding to each header row a number of line items will be printed in the inner box.
There will be multiple numbers of headers as per requirement. How can this feature be implemented in SMARTFORM / SAP-script?Hi ,
You can try using a combination of variable window and main window to achieve what you are lookoing for.
You will have to use Main window instances such a way similar to newspaper printing.
Cheers
VJ -
How do I reference an EJB inside anothe EJB ,both are on different hosts
Hi,
I want to reference an EJB on one host inside another EJB in another
host. Even if i hardcode the url of the host on which the EJB is
deployed , it gives me the error regarding the no such ejb found.
I would appreciate your help.
ThanksRobert,
We've been trying to implement this type of multi-server setup for some
time now. Our application consists of 260+ EJBs with a large team of
developers actively working against it. The business logic in our
application puts the EJBS in a highly interrelated situation. This
degree of interrelation makes it necessary for each developer to deploy
the entire application before any work can get done.
Starting a weblogic server, on a Windows Workstation, with 260+ beans is
very time consuming. But to get around this development bottle neck, we
are attempting the same scenario described in this thread. We have
recently upgraded from WL4.5.x to WL5.1 SP8. With WL5.1, we get the
CommunicationException seen previously in this thread. But the Error
message in WL5.1 is less descriptive. The 5.1 error message is missing:
WL6.0 Error Text: "This error could indicate that a component was
deployed on a cluster member but not other members of that cluster. Make
sure that any component deployed on a server that is part of a cluster
is also deployed on all other members"
It is obvious that weblogic's clustering depends on classes being
available to each server in the cluster, including the ejbc generated
_WLStub classes. To me, it seems wrong that a weblogic server can only
use standard JNDI to lookup HomeInterfaces on other weblogic servers if
the hidden _WLStub classes are available to both servers. I say this
because non-weblogic clients have JNDI lookup abilities without these
requirements. This whole experience was frustrating because all along
I knew that the solution was simply to take the hacker route and put the
classes in the the client classpath. I guess I just want to know if
this is bug? If not, I think it should be.
Thanks for listening
Steve Dodge
Steve Dodge
Realeum Inc.
Robert Patrick wrote:
Here is an example:
On server1, I have a Bean called TellerBean that calls the AccountBean
that lives on server2. To make this work, I need to deploy the
TellerBean.jar file AND any/all AccountBean Stub classes (any file in the
deployed version of the AccountBean.jar file matching the pattern
AccountBean*Stub.class) on server1. Server2 only needs to deploy the
AccountBean.jar file
Hope this helps,
Robert
kamps wrote:
Thanks.
I did include the files using import and they are alsso packaged
into the jar file .
I have done this , TradeCheck is the ejb i am trying to reference
in Trader EJB.
I package them into the jar file as follows:-
@REM Compile EJB classes into the build directory (jar preparation)
javac -d build TradeCheck.java TradeCheckHome.java Trader.java
TraderHome.java TraderBean.java TradeResult.java
@REM Make a EJB jar file, including XML deployment descriptors
cd build
jar cv0f std_ejb20_basic_statelessSession2.jar META-INF examples
images
cd ..
@REM Run EJBC on jar file
java -classpath
%WL_HOME%/lib/weblogic_sp.jar;%WL_HOME%/lib/weblogic.jar weblogic.ejbc
-compiler javac build\std_ejb20_basic_statelessSession2.jar
%APPLICATIONS%\ejb20_basic_statelessSession2.jar
It still gives the same error not finding the stub class.... Could
you kindly elaborate on what needs to be done.
I would appreciate your help.
Thanks,
Sunitha
Robert Patrick <[email protected]> wrote:
The problem is that the client that downloads the stubs
at runtime cannot
be another WebLogic Server. We do not support downloading
classes into a
running server so you will need to make sure that the
stubs are
"available" to the server that is acting as a client (e.g.,
packaged in
the EAR file) on the server acting as a client.
kamps wrote:
Thanks Mahendra. I am using WebLogic 6.0. Should I importthe package
in the first ejb which references the 2nd ejb or evenin the client
which references the first ejb.
Thanks again,
Sunitha
"Mahendra Dhamdhere" <[email protected]> wrote:
You are not getting the reference of stub.
try this. In your client program, import the package
in
which ejb classes
are present. As client downloads the stub from weblogic,
you have to import
the package where your stubs are present.
which version of weblogic are you using?
Mahendra
kamps <[email protected]> wrote in message
news:[email protected]...
Thanks,
I have 2 ejbs: one is TraderBean and a client RefClient.
TraderBean in turn calls a method of another bean
TradeCheckBean.
I tried making the changes as suggested but I amgetting
the following
error on the client side.
java examples.ejb20.basic.tatelessSession.RefClient"t3://localhost:7001"
javax.naming.CommunicationException. Root exceptionis
java.rmi.UnmarshalException:
failed to unmarshal class java.lang.Object; nested
exception
is:
java.lang.ClassNotFoundException:examples.ejb20.basic.statelessSession.Trade
CheckBeanHomeImpl_WLStub: This error could indicatethat a component
was deployed on
a cluster member but not other members of that
cluster.
Make
sure that any componen
t deployed on a server that is part of a cluster
is
also deployed
on all other member
s of that cluster
java.lang.ClassNotFoundException:examples.ejb20.basic.statelessSession.TradeCheckBea
nHomeImpl_WLStub: This error could indicate that
a
component was
deployed on a clus
ter member but not other members of that cluster.
Make
sure that
any component deploy
ed on a server that is part of a cluster is also
deployed
on all
other members of tha
t cluster
<<no stack trace available>>
I would appreciate any help.
Thanks,
kamps
"Mahendra Dhamdhere" <[email protected]> wrote:
you need to get initialcontext of that server.
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
try
ctx = new InitialContext(ht); // Use
the
context
in your program
} catch (NamingException e)
{ // a failure occurred }
finally { try {ctx.close();}
catch (Exception e)
{ // a failure occurred } }
use url of that other server. After getting initialcontext,
lookup for your
ejb.
Mahendra
kampu S <[email protected]> wrote in message
news:[email protected]...
Hi,
I want to reference an EJB on one host inside
another
EJB in another
host. Even if i hardcode the url of the host on
which
the EJB is
deployed , it gives me the error regarding the
no
such
ejb found.
I would appreciate your help.
Thanks -
Front pannel inside another front pannel
Hi, I want to have one front pannel inside the main front pannel. For example if you click on delete, add or multiply on the main front pannel then another front pannel appear where you can do all these additions or multiplying etc.. and them import those new data into the main front pannel. Would labview able to do that? If it can what approach should I take.
Se.Well, you can't actually embed one front panel inside another (yet). However, depending on exactly what you are trying to accomplish there are a number of ways of getting to where you want to go.
First, you could create all the various front panel objects you want to be able to see at at various times and use property nodes to make visible only the ones associated with the function the user selected.
Alternately, you can create windows that pop open when a user selects an operation. Such windows are simply LV VIs that you have set to appear as dialog boxes when they run.
Both approaches work well. The one you select is a primarily function of what the user-interface needs to look like and how your customer wants it to work. Technically, the second appro
ach is potentially more expandable in the future with less impact on existing code.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Hi,
I am developing a GUI application like VB. How do I get Frame inside another Frame which can be moved.
kumananHi,
The only way:
JDeskTopPane (as main window GUI)
and then use:
JInternalFrame (all other moveable windows)
Regards,
Manfred. -
Scheduling one background job inside another
Hi All,
Is it possible to Scheduling one background job inside another.? i.e In my Z program I am calling job_open, job_submit, job_close and to execute one standard report in background. And after that I am executing my Z program itself from SE38 as Program->Execute->Background->Execute Immediately. Is this logically correct? I am asking this because I am not getting the desired result
Thanks & Regards,
Neethu.HI,
Check the job steps in SM36.
First schedule the Standard job and in the job steps schedule the z report.
Schedule job in chain -
How to access a variable from inside another symbol
So i did this tutorial, Leveraging Independent Symbol Timelines created by Eliane...it's rockin, btw. ;-)
All's well but now i have a symbol on the stage called mc-home. inside of mc-home is a button called btn-go.
On the stage in composition ready there's a variable sym.setVariable("current", "mc-home");
This code works for a symbol that's on the stage but, how do i get this code to work on a button that's inside another symbol that's on the stage?
var current = sym.getVariable("current");
if (current != "") {
sym.getSymbol(current).play("OUT");
sym.getSymbol("mc-something").play("IN");
sym.setVariable("current", "mc-something");sorry, i was kind of confused myself too, don't worry about it but thanks for your patience for reading it anyway
-
How can I insert a folder inside another folder
is it possible to have sub folders
I want to create 3 main folder
MainFolder 1, mainfolder2, mainfolder3
And I want to have 5 folders inside mainfolder 1
so when the user click on mainfolder 1 , will see 5 folder in it , not next to it
sincerely yours
Riade AslehSo far I have not got any solution
i want a folder inside another folder
for example
i have to main folders , folder 1 , folder2
folder1.top =25
folder1.left =10
folder2.top =25
folder2.left =115
now, I wan a sub folders inside folder1
subfolder1.top =50 not 25
subfolder1.left =30
I dont' want the subfolder1 to have the same top as folder1.top
it's seems that all folders must have the same top value
because when I changed the value of the subfolder1.top to 50, the value of folder1.top, and folder2.top changed to 50, in which i don't want it to behave like that
if you have a sample code, please sent it to me
sincerely yours
Riade Asleh -
How to use one hash table inside another hash table
Hi everyone,
Any example of hash table inside another hash table.
Can one here help me how to write one hash table inside another with repeating keys for the first hash table.
Thanks,
kanty.Do you mean you want the 'value' entries in a hash table to themselves be hash tables? Easy but this often indicates a design flaw.
Hashtable<String,<Hashtable<String,Value>> fred = new Hashtable<String,<Hashtable<String,Value>> ();But what do you mean by "with repeating keys for the first hash table"?
Edited by: sabre150 on Jul 2, 2010 10:11 PM
Looks like you have already handled the declaration side in your other thread. I suspect you should be writing your own beans that hold the information and these beans would then be stored in a Map. The problem I have is that your description is too vague so I can't be certain. -
How to register one MBean inside another MBean
Hi All,
When i try to register one MBean(DynMBean1) inside another(DynMBean2) by passing object name of this MBean as attribute to the other MBean,iam getting the following error:
Following shows the adapter interface
List of MBean attributes:
Name Type Access Value
DynBean2 java.lang.ObjectName RW Type Not Supported: [ [DynBean2:bean=sample]
name java.lang.String RW
if the above code works properly,in the ''value' column there should be ''view' button and only [DynBean2:bean=sample]' should be present in the value column.Also,if we click on Can any predict what the problem is......?
Regards
Ravi
Mail Me:[email protected]I don't understand what you mean by register a bean inside another bean.
-
Retreiving the file names from directory inside another directory from application server
Hi,
I had a problem in retreiving the file names from a directory inside another directory.
I tried using the FM's SUBST_GET_FILE_LIST, RZL_READ_DIR_LOCAL and EPS_GET_DIRECTORY_LISTING
But here I am getting only one directory details.
Actually my file is located a directory inside one more directory and one more directory and inside the files are located.
i.e total 3 directories inside the 3rd one my files are there.
I need to read the latest file name in the directory.
So that i can do some manipulation after getting the file name.
Is there option like OPEN DATASET , READ DATASET and CLOSE DATASET?
Can anyone please let me know How can i acheive this one.
Regards
RamHi Ram,
Following thread can be helpful for you, were it shows in the tables structure rsfillst a field RSFILLST-TYPE whether its a directory or file..........
http://scn.sap.com/thread/865272
thanks and regards,
narayan -
Problem in reading an object inside another obj in C thru JNI
Hi All,
I am passing a java class object from Jave to C thru JNI.
This object has many integer fields + one object of another class, which also has some fields.
I am able to read integer fields from C but not able to read fields inside another object.
Can anyone plz help me in reading the object inside another object from C.
I m pasting class here for better understanding :
public class ImageMergeInformation {
public ImageInformation outputImageInfo;
public ImageInformation[] inputImageInfo = new ImageInformation[8];
public int topMargin;
public int bottomMargin;
I wanna read ImageInformation obj.
Plz help me...
Thanks in Advance,
Regards,
SnehaYou have to get the field id (getFieldID) of the variable you want, e.g. outputImageInfo, then get the object (getObjectField) in that field. At this point, you can start over (get the class, get the field id, get the object).
-
How to put an MSO inside another MSO
Hello all!
An interesting question came up in the following post by Folobo:
http://forums.adobe.com/message/4572897#4572897
"Is it possible to use a slideshow embedded in a big overlay slideshow?"
I'd like to rephrase this question:
"Is it possible to put a MultiStateObject (MSO) inside another MultiStateObject?"
And further: if the answer is "yes", could we put that to use with the DPS?
@Folobo – this is an interesting question. A quick test is showing that you cannot do it in the UI (correct me if I'm wrong).
Let's try it this way:
If you have two objects:
1. an MSO #1 (with two rectangles, rectangle #1, rectangle #2)
2. Another rectangle on the page: rectangle #3
Now select the two objects and make an MSO out of it (using the "Object States" panel).
You would think, now I get an MSO with two states, state 1 with rectangle #3 together with state 2 with MSO #1.
But not so:
Result: One new MSO with three states (rectangle #1, rectangle #2, rectangle #3)
Hm. I don't give up on that. Let's try it another way:
Could we select at least two objects inside a state of an MSO and make that a new MSO?
Sure, We could select two objects inside a state, but since we are *inside* an MSO the "Object States" panel does not show the possibility to make a new MSO. You can only add states or add objects to states…
Frustrating. End of story? Maybe…
Be forewarned. The following is highly experimental!
Let's try it by scripting (ExtendScript/JavaScript).
The scripting reference is showing that an MSO "MultiStateObject" object has an add()-method. And further on, that add()-method could be applied to:
Document
Spread
MasterSpread
Page
Layer
pageItem
And that is the key to a possible solution. We could add a new MSO to a "pageItem" object.
A simple rectangle should be qualify for a "pageItem" object; and that, of course, could reside in a state of an MSO.
So, we could add a new MSO to a rectangle inside of a MSO!
How can we access a rectangle inside a MSO? Easy: We could select it and work with that selection.
So let's do that: select the rectangle in the first state of an MSO and run this one-line-script (be sure you did select the rectangle and not the MSO or one of its states:
app.selection[0].multiStateObjects.add();
We now have an MSO inside another MSO!
Explanation:
A "generic MSO" was added with the add()-function to a selection (the container object: in our case the selected rectangle).
The "generic MSO" is a two state MSO consisting of one rectangle in each state of a very small size (10px x 10px).
At first it is invisible, because it is very likely that it is positioned outside the geometric bounds of its container object (the rectangle).
But we can customize this!
Go to the layers palette and select the new MSO, move it inside the geometric bounds of its container object, readjust its size, add states as you wish, populate the states with images, and other objects etc.pp.
So, what can we do with an MSO inside another MSO? (As I already said, this is highly experimental.)
My experiments with that are very fresh. I did not try a lot. But it seems that we could at least autoplay this MSO.
I have to test more thoroughly what is possible and what will work with buttons etc.pp…
I really like to hear from you what you will find out and if you can put it to any use.
Uwe
Message was edited by: Laubender@Mobly – in case it did not work out for you, here some screen grabs for the different steps:
1. Select an MSO:
2. Select a "graphic frame" inside the MSO; in this case a "<square>"; you can see the big blue dot in the Layers panel behind the generic name "<square>":
3. Open the Scripts Panel and select the script:
4. Run the script by double-clicking the script; the generic name of your selected object has changed to "graphic frame", but trust me, it's still a square…
5. Click the "Ok" button of the message and InDesign will select the new MSO ("Multi-state 2") as you can see here. It has two states with one rectangle each, fill and stroke is "None":
And: you can see that this new MSO is nested inside the MSO ("Multi-state 1").
What you do with that construct is up to you:
6. Color the "<square>" of state 1 of "Multi-state 2":
7. Resize and change position of "Multi-state 2":
8. But remember: "Multi-state 2" is nested in the graphic frame you selected before running the script:
I hope you get the picture now…
Uwe -
Get the ID of a dynamically created symbol from library, INSIDE another symbol.
Hi everyone,
I'm trying to get the id from a dynamic created symbol from library.
When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
But I just can't get it to work when creating the symbol inside another symbol.
Below some examples using both "getChildSymbols()" and "aSymbolInstances"
// USING "getChildSymbols()" /////////////////////////////////////////////////////////////////////////
// ON THE STAGE
var m_item = sym.createChildSymbol("m_item","Stage");
var symbolChildren = sym.getChildSymbols();
console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
// INSIDE ANOTHER SYMBOL
var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
console.log(symbolChildren.length) // returns 0 so can't get no ID either
// USING "aSymbolInstances"" //////////////////////////////////////////////////////////////////////////
// ON THE STAGE
var m_item = sym.createChildSymbol("m_item","Stage");
console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
// INSIDE ANOTHER SYMBOL
var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element
In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
Could it be this only works on the stage/ composition level only and not inside a symbol?
The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
1) Storing a reference of the created symbol in an array and call it later by index.
2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
I can't believe this isn't possible. I am probably missing something here.
Forgive me I am a newbie using Adobe Edge!
I really hope someone can help me out here.
Anyway, thnx in advance people!
Kind Regards,
Lester.Hi,
Thanks for the quick response!
True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
Although I know it is possible.
Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
I want to reuse this (unique) ID given by Edge after creation.
If created on the stage directly you can get this ID very easy. Like this;
var m_item = sym.createChildSymbol("m_item","Stage");
var symbolChildren = sym.getChildSymbols();
console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
I want to do exactly the same when created INSIDE another symbol.
var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
This is what i'm after.
Thnx in advance! -
Loading a SWF inside another SWF question
Hello friends,
1. (IMPORTANT) As all we know when putting some Flash SWF
inside an HTML page, normally it starts playing as soon as its
first frame is loaded.
Now in my case I have to load a SWF (let call it Flash A)
inside another Flash, I used mx.controls.Loader control to do this.
But this internal loaded SWF (Flash A) doesn't display untill it is
completely loaded. Although what is interesting is that if it
contains a sound track I can hear it while it is being loaded.
I wana know is there any way that we can make this Flash
display while being still loaded.
2. Is there anyway to change a Flash playback FPS at runtime?
Thank you so much for any note and help.
- Mdamatrixhasu wrote:
> i want to know how i can load a flash inside another
flash container
go to help - search for 'loadmovie'
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami>
Maybe you are looking for
-
Based on an xsd schema create a table
Hi all, i need a way that allow me to create a table having an xsd file, in others word i load the xsd schema and create a table accordingly to the element that the xsd schema has respecting also the datatype of every element. Is the some functionali
-
I have an IPOD Nano 4th Generation 8GB and am unable to restore it back to factory settings even when it is connected to my MAC. I have tried the menu/select hold but is not doing anything. When connected to the MAC and select restore in itunes it
-
Table relating fields Equipment number and grouping2.
hi all, i m making a report for T-code 'IE03' and i have to display grouping2(FGRU2) and its description in output with respect to Equipment number(EQUNR), but problem is that i m not getting the table relating to both fields. can anyone please help
-
Safari 5.1 and pdf display
There used to be an option to display pdfs in Acrobat or Preview, but this doesn't seem to be available immediately any more. I do not want the pdf to open in Safari first then I have to right click the pdf page to allow it to open in Acrobat. Readin
-
Lenovo V200 does not support 1920x1080 resolution
I have a Lenovo V200 (0764-33G) with a LG W2343T external monitor attached which has a native resolution of 1920x1080. For some reason this resolution is not supported by the notebook. It is not a chipset issue as the Intel GM965 chip does support 19