Add component to existing GUI

hi,
I have created simple GUI with one panel containing button and textfield:
public class GUIClass{
private JTextField textField1;
private JButton button1;
private JPanel mainPanel;
private final JFrame frame;
public GUIClass() {
frame = new JFrame("hello");
button1.addActionListener(new pushbutton());
public static void main(String[] args){
GUIClass GU = new GUIClass();
GU.frame.setContentPane(GU.mainPanel);
GU.frame.pack();
GU.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
GU.frame.setSize(400,400);
GU.frame.setVisible(true);
class pushbutton implements ActionListener {
public void actionPerformed(ActionEvent ae){      
textField1.setText(textField1.getText()+"hello");
my question is, if I want to add a new button (or any other simple component) after pressing button1, what should I do?
thanks
Koby

hi,
The two operations ( YourPanel.add(newComponent); YourPanel.validate();) are working, but I can see the changes only after I change the window size or minimize and restore it(wired).
In addition I recive a list of errors from the-> YourPanel.add(newComponent);
note: I created the GUI with GUI designer and probably I should do something more in order to insert new component to the panel ?!
Do you have any idea?
thanks
Koby

Similar Messages

  • Add component in task list

    Hello All,
    I have an issue with adding component in task list (for example task list number EIMN-68) via transaction IA05.
    When I try to add component to operation, I get the message *
    Standard BOM PAEIMN-68  4 already exists
    Message no. 29771
    Diagnosis
    You want to create a standard BOM for standard object PAEIMN-68 with usage .
    A BOM already exists for this standard object and usage. You cannot extend a standard a standard BOM.
    Procedure
    Check whether the standard BOM is suitable for standard object PAEIMN-68 and usage . If it is not, you need to create the BOM for another standard object.
    Is there any special way to create material master for such components.Whats the solution.
    Please help
    Cheers
    Sunny

    Hi Pithan, how are you..
    I want to add components.
    Just now I was able to add components. I explain how:
    When i added component number in operation, and press enter, system gave me the error that standard bom already exist. In the same screen I changed the BOM usage to 3 as universal usage. After this usage only, system allowed me to add components. No other bom usage allowed me to do so.
    Also, why system took me to BOM screen if I just want to add components.
    I wait for your reply.
    thanks and regards
    Sunny

  • Error in Integration Scenario: No software Component version exists

    Hi Experts,
    We have external product and software component like Product "Project Management" we have imported the CIM content for it
    Now when we create an Application Component for the same in Integration Scenario in ESR (PI7.1)
    while trying to do right click --> Edit Action it gives Error
    "" No imported software component version exists for product"
    Also note that it allows us to Add new Action there
    that is we can right click --> Add action
    Kindly help with your suggestions to resolve this << Moderator message - Everyone's problem is important >>.
    Regards,
    Jagadish
    Edited by: Rob Burbank on Nov 10, 2010 3:56 PM

    Hi Experts,
    Tried the steps given in SAP Note: 768148
    Still it is not resolved.
    I appraiciate if any one suggest some more options to resolve this.
    Regards,
    Jagadish

  • Need advice in writing forum component for a GUI application

    Hello,
    I need to write a forum component for a GUI application, that is a visual component that would have all the usual forum functionality - creating threads, posting replies, editing, logging in, etc. I'm planning to use some existing forum engine on a JBoss/Tomcat server. So I do not need a web-interface for a forum, but I need find some engine written in java with a clear interface that I could use in my app. I tried JForum (http://www.jforum.net) first, but it seems it doesn't have open API I could utilize.
    Could anyone please suggest appropriate engine, possibly anyone knows of open-source forum GUI apps I can look at?

    Google? You've never heard of Google? Seriously? Did you just get Internet access yesterday?
    http://www.google.com

  • How can i add an already existing iphone to a different itunes account without changing anything on the actual phone...just updating it?

    I have an iphone synced to my iTunes account.  But I need to add another used/existing iphone to my account to update it.  I do not want to sync my emails/contacts/apps, etc. from my computer/iTunes to this new iPhone.  This 2nd iPhone already has existing apps and is in use.
    Is there any way that I can do this without changing anything on the existing iPhone?  All I need to do is update it to the iOS 5.0.1. 
    Thanks!

    Thanks so much for the response!  You have been helpful and quick! 
    It wasn't my phone, hence the reason we didn't want to share/take each other's content (apps, contacts, music, photos, etc.).  But the owner's phone hadn't been able to update because of a computer crash/no access to a stable computer.  So, I just wasn't sure if we could do an update without sharing content. 
    But you most definitely answered my question!  So, thank you!

  • Is there a way to add to the existing values in a container when a LabVIEW prototype (cluster) changes?

    Is there a way to add to the existing values in a container when a LabVIEW prototype (cluster) changes?
    I have a cluster with 90 values..  ninety!  yes that many.
    Change one bloody value and the prototype changes in the TestStand step...  Reload the prototype and guess what happens??!!??
    All the bloody values get reset to defaults!  AAAAAAAAAAAAAARRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGHHHHHHHHHHHH!
    If it was in one place, I could survive the ordeal.  But I have to change bloody prototypes in many places!!!!
    more AAAAAAAAAAARRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!
    I can't even copy the bloody values!!!!!!!  AAAAAAAAAAAARRRRRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!
    Are there any tricks that I am not aware of, or have forgotten over the years, or...  ...   something??!!??!???!!
    If there are none, I will have to post an improvement to TestStand..  I should mention I am using an older version (4.1).

    Hmmmmmmmmmmmmmmmm,
    I am not not very famous with LV and its cluster types.
    So no idea if this works (it works for DataTypes updates very well and a LV cluster is Data Type so.... maybe)
    Make a copy of the step that has to be modified to an new sequencefile. 
    Make modifications the in the copy.
    Now you should have the same DataType Name but other contents in the container. Save it.
    Normally there should be a message box that tells you that version has been incremented. - Accept it.
    Set in StationOptions-File "Allow Automatic ...." to Never.
    Open original sequencefile. Now the there must be a type conflict. Accept/Apply to all  "Use Current Loaded.."
    You have updated the type.....
    Hope this worked,
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Error: No valid application component hierarchy exists in RSA5

    Hi Gurus,
    We have recently installed SAP R/3 for BW. when i get in to RSA5 i am getting error message "no valid application component hierarchy exists" .  Do i need to do any settings here. When click enter later on, i can see all the data sources under new_hier_root.
    And under new_hier_root i have unassinged notes
    New_Hier_root -> unassigned notes -> application components.
    Thanks in Advance,
    Jameel

    Jameel,
    first we need to transfer application hierarchy.
    try this one SBIW>Business Content DS>Transfer Application Component Hierarchy or RSA9.
    Hope this help.
    Regards,
    Nagesh Ganisetti.

  • How do I add songs to existing playlists on the iPhone?

    I've tried going to the playlist, tapping the + button. Then I select the song by tapping it, it grays out as though selected. I tap done, and again done in the playlist. But the song is not appearing in the playlist. Am I missing something?

    How do I add songs to existing iTunes store playlist I have published?
    From iTunes Help...
    To change or delete a published playlist:
    Sign into the iTunes Store with your Apple ID, if you haven’t already.
    In the Playlists section of the iTunes Store, click All Playlists By This User.
    Select the playlist you want to change or delete, and then click Edit.
    Do any of the following:
    To change the playlist’s title and description, type any changes.
    To add a song, click Add Songs, select a song, and then click Add. When you’re finished adding songs, click Done.To find a song by album, artist, or song title use the Search field.To hear a 30-second preview of the song before adding it, double-click the song’s title or click the Preview button .
    To remove a song, click the “x” to the right of the Buy button for the song you want to remove.
    To arrange your playlist, drag songs in the order you want.
    To delete the playlist, click Delete this playlist.
    When you’re finished making changes, click Save.

  • How to add Mac27" to existing home network? and read files on other PC computers (Window7)

    How to add Mac27" to existing home network? and read files on other PC computers (Window7).
    type of connection:
    All computer (PC & Mac) connect to router (ethernet or wireless), then connect to internet.
    condition:
    internet works fine on all computer (PC & Mac).
    existing 4 PC communicate well (share files & printers),
    my problem:
    can NOT add Mac into existing home network.
    I tried SYSTEM PREFERENCES, then NETWORK, then ......... several times
    could not make it work.
    pleas help.

    Ah, it looks like I should have read your title more carefully. Are the  files on the PCs that you want to share with your iMac in a shared folder?
    If not, follow the steps on this page to set up shares from Windows 7.
    If that is already set up, connect to the share from the iMac using this article.

  • Release BI 7.0 front-end add-on for SAP GUI 7.10, Support Package 700

    Hi guys,
    In SAP note 1238872 the release of new support package has been mentioned (Quote: "Download the BI 7.0 front-end add-on for SAP GUI 7.10, Support Package 700 from the SAP Service Marketplace.")
    So, can someone tell me, when this Support Package will be released?
    (At the moment the last version provided in download area is 6.02)
    Kind regards
    Markus

    Thanks, but my question was not how can I workaround, cause I was able to read that note. (Unfortunatly the workaround solves the problem for the query designer only and the error still persists when executing the query)
    However, can some one please tell me, when the Support Package 7.00 will be released?

  • How to add IBAN to existing Bank Accounts

    We would like to add 'Alternate Name' & 'IBAN' for existing Bank Accounts.
    How to import/add using API
    Navigation: AP > Setup > Payment > Banks
    Select appropriate Bank & Branch. Then click on 'Bank Accounts' button.
    There you see 'Alternate Name' & 'IBAN' fields.
    I have found following Note for doing it in R12
    R12 How To Import/Add IBAN For Existing Bank Accounts (Doc ID 1269968.1)
    But we are on 11.5.10. What is the API for doing this in 11.5.10
    Regards,
    Srini

    Hi Srini,
    Unfortuantely, Development has not released any API's for maintaing bank account information in the 11i version of Oracle Applications. This is only available in R12.
    Cheryl

  • [SOLVED] Cannot Add Files to Existing Briefcases; New Briefcases OK

    I have a user - probably the only user I can recall ever using this feature - that is unable to add files to existing briefcases.
    When attempting to drag & drop a file into a briefcase (any) a small window or pop-up appears & disappears and the file isn't present.  The pop-up displays and hides all too fast for us to see what was written as it happened well under a second.
    The problem seems specific to the existing briefcases:
    If the user creates a new briefcase, and copies the files from the old briefcase into the new, just like above nothing actually gets copied into the new briefcase.
    If the user copies the files from the old briefcase into their desktop, then copies the files from the desktop into the new briefcase, it works fine.
    So the current fauxlution (faux+solution) is to go through the latter process, but they have a few dozen briefcases and that's going to take some time.
    To be quite candid, I'm not entirely sure where to begin - how does one go about fixing a broken briefcase?

    Hi,
    Sorry but I'm afraid to say that with limited information, it's somewhat hard to find out what exactly happened. What is the result when copying from a new briefcase to another new briefcase directly? Are there anything recorded in the event viewer?
    Might be helpful for troubleshooting.
    Since we're unable to reproduce this issue, I recommend you use process monitor to trace the process when copying the files form old to new briefcase.
    https://technet.microsoft.com/en-us/library/bb896645.aspx?f=255&MSPPError=-2147217396
    Regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Patch 1 for BI 7.x Add-On for SAP GUI 7.10 Released

    Hi SAP NetWeaver BI 7.0 users,
    If you are using the BI 7.x Add-On for SAP GUI 7.10, it is highly recommended that you apply patch 1 to correct some issues with the BEx tools. Patch 1 is now available for download from the SAP Service Marketplace at service.sap.com/swdc.
    For a brief description of the requirements for and support of the BI 7.x Add-On for SAP GUI 7.10, please see my blog at https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6839. [original link is broken] [original link is broken]
    Regards,
    Katie Beavers
    SAP NetWeaver Product Management

    Thanks for sharing.

  • Facing problem to add component in a panel dynamically

    I face serious problem to add component dynamically on a jpanel. can any one help me?
    I have one panel inside a frame. And I have another 3 or 4 panel. dynamically i want to change the panel inside the frame with the other panel.
    can anybody help me with source code?
    Your earliest response is highly appreciated.

    remove is reflected immediately without calling
    validate() but it does not work for adding. please
    give me some code.Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html

  • HT1731 "AirPort Express: How to join an existing Wi-Fi network in client mode" = 'Add to an existing network' will not result in pure client mode

    Choosing that option will always end-up in extending my wireless network.
    What I want to achieve is to just add my AE to the existing WIFI network and to use it for local access like AirPlay or Printing.
    No other client e.g. iPhone, iPad etc. should be able to connect to that AE wireless.
    So it seems that there's one step missing in that description.
    As a last step you need to manually change the set-up so that Network Mode shows 'connect to wireless network'.
    Afterwards your AE will be finally in 'Cient Mode'.
    I_am_Andy

    Thanks you!  Apple's documentation is either contradictory or incomplete.  To configure a factory default AE to "join" a network with
    Airport Utility 6, you must first select "Add to an existing network".  That results in the AE extending a network.  Then later, edit the configuration (wireless tab) to specify "join" rather than "extend".
    You can "join" a network which has already been extended; this improves the wireless reach, since you can not extend a network which has already been extended.  So you can have:
    Apple Extreme  <---->  Apple Express (extending)  <------>  Apple Express (joining)  <-----> ethernet-device

Maybe you are looking for

  • Subscription and credit not posted to my account!

    pls help ! i paid to global collect bv from romania,raiffeisen bank, for 120mnts,reference number [redacted for privacy] on 19.12.2013 and no credit.  i paid again same way,for 400mnts,reference number [redacted for privacy],on 27.12.2013 and again,

  • How to find the structure fields data in database tables?

    how to find the structure fields data in database tables?

  • Creating JE problem

    Hi, I am posting JE through SDK. While adding it is showing error as Unbalanced transactions. If I pass single debit and credit entries it is creating but in my case i have to pass 2 credit and 2 debit entries.             Dim vJE As SAPbobsCOM.Journ

  • DO NOT INSTALL ITUNES 8

    Thats right, it is junk. I installed iTunes 8 and now when I boot up my computer it gets stuck in an infernal loop. I receive an error popup without any error message and an OK button. When I click on the OK button it tries to reboot but gets caught

  • Regex Help: Word not following by another word

    Hi, I am trying to write a regex that would return me lines containing a given string but it should not be followed by another. Lets say the lines in the sample file are as follows: ABC.EXE ABC.PDF ABC.TXT ABC.DOC RegEx I used is as follows: ^.*ABC.*