Questions about close a JFrame

1) Creat a new JFrame frm1 to show a login page
2) when user entered username & password, and clicked "OK" button, the program will check it's authority. when passed, I want to open a new JFrame and close the login frame.
but I couldn't close the login page, and i found nothing on close JFrame on JFrame's API, except
frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
maybe the usage about JFrame totally wrong. please give me some help. thank you!

Hy
On clicking the Login Button, u should validate the authorization.
Eg:- If authorisation success then 1 , else 0.
so if 1 means.
this.dispose();
newFrame.setVisible(true);
if authorization 0 means,
show some message using JOptionPane.showMessageDialog(...);
and let the cursor be in the first field.

Similar Messages

  • I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher

    I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher #1 iPad to its AppleTV without effecting/projecting onto the adjacent teachers #2 classroom AppleTV?

    Not as such.
    Give the AppleTV units unique names and also enable Airplay password in settings with unique passwords for each teacher.
    AC

  • A lot of questions about my MacBook Air

    I am really new to re-using Apple computers.The last time I used an Apple computer was back in 1987 when the school and my family had Apple IIGS computers. I have been using PC's which reqiure Microsoft. I a lot of have questions (10 questions) about my MacBook Air and I hope you good people can and will help me.
    Product: MacBook Air
    Operating System: Mac OS X Version 10.7.4
    1) I Downloaded MacKeeper because I was fooled. I had a bad feeling just before I Downloaded it and I should have listened to my heart. However, I didn't buy it or fully Install it. It was like a test run and then they wanted me to pay almost $100 for it. Thankfully, I didn't because I read it is Malware. I spoke with an Apple Tech at Apple Care and he helped me get rid of it (or so we think). I don't see it anymore on my computer. I read it can slow down your computer. How can you tell if it's really off of the computer?
    2) When I open "Finder" and I see that there are people Sharing my computer with me. I went into AirDrop and it reads, "Other people can see your Mac as (my name) MacBook Air when their computer is nearby." I bought a HotSpot and while it's turned on and I selected it as my WI-FI connection I thought it would  get rid of these people, protect what I type, me, my items, computer, etc. But it didn't.  
    I didn't know that I have to buy a exteral CD and/or DVD Player in order to connect to the brand new Modem and Router in one by NetGear. I am so used to PCs and the CD/DVD Players being built inside.
    The people at Apple Store told me that there is an internal modem inside, but I don't know how to find it and what to do then.  Should I use a Firewall?, An AntiVirus, AntiMalware, AntiSpyware, etc. Apple Care tech told me I don't need to get an AntiVirus.
    3) Is there a new kind of Wireless Modem and Router that doesn't require a CD-ROM?
    4) When I travel or fly and I am not close to home I was told by Best Buy and Sprint that I had to buy a mobile HotSpot to use the computer (WI-FI) safely. As I typed, I have one. But it's pretty expensive and only gives me 1 hour and 15 minutes per day to Stream. What can I do to use this computer safely Online when I am out of range from a Modem and Router? What do people do when they travel on airplanes?  
    5) This compter won't let me use "Raid." I think you have to have a newer version. I hard about Raid on the radio from Leo (can't recall his last name) who's a Tech expert.
    6) Should I buy a ZipDrive? Apple Store Tech told me that I didn't need a ZipDrive. I just remember the episode of HBO's "Sex and The City" when Carrie looses everything because her copy crashed. Now, of course, I know that's a fictional show, but with PC's and Microsoft I have lost everything when it crashed, frooze up, etc. I know there's iClouds. I heard about Carbonite, but I have read the Pros and Cons about it. Mostly they are Cons about it. I just don't want to do anything wrong and mess up this computer.
    7) Should I buy a new Printer/Copier/Scanner because mine is an HP. It's not new, but it works. I even have a CD-ROM for Macs. What about the new product called, "Neat"?
    8) Is there a special product that I should buy to do Online Banking and/or other important stuff?
    9) I saw and read about iWork in the Apps Store and it sounds cool. I still have alot of friends and colleagues who still use Microsoft. Is iWork good to use? Should I Download it from the Apple Apps Store or can a buy it at Apple? Is there another Word Processing Program that is great and user friendly and will work with Macs and PCs?
    10) Should I Update the OS with OS X Mountian Lion Pro from the Apple Apps Store or buy it at Apple Store?
    In advance, I wish to thank you in this Apple Support Communites for your help.  Have a safe and happy holiday weekend!

    1) Here are instructions for removing MacKeeper. Since it mostly consists of manually looking for folders and specific files, if you follow the instructions you either fail to find what you are told to find (because your AppleCare guide gave you complete instructions which you followed) or you'll find some additional files that need to be replaced.
    2 & 3) I assume you are looking at the sidebar of a Finder window and seeing Shared and computers under it. Those are computers that you can potentionally share. To do so you'd need an account on their computer and a password. They are not sharing your computer.
    AirDrop allows you to create an adhoc network for filesharing and it only functions when you have selected the AirDop item in the SideBar. Actually doing that merely announces to computers in the same network node that your computer is available for a file to be sent to. Even then you have to explicitly allow the file to be downloaded to your computer. Similarly you'd be able to see other computers with AirDrop selected and be able to send them a file - which they'd have to accept.
    The only reason your NetGear Router comes with a CD is to install and run their 'easy' step by step configuration program. It can also be done manually with a browser. Read the manual to find the IP address you must enter to access the router's configuration menu. Apple's WiFi routers don't require a CD to install the software because the configuration software is already on your computer.
    I do have my firewall turned on. AntiVirus software isn't a bad idea - I use Sophos having tested it for a review for our local User Group and I found I liked it better than ClamAVx which is what I'd been using before. Both are free.
    4) I think you were scammed by Sprint and BestBuy. I use hotel, coffee shop, and restaurant WiFi spots and have for years. However, because they can be unsecured, I do not shop online or bank when I'm using them. I also use 1Password and don't reuse passwords so even if a sniffer should grab an account and password that's all it would get - one account.
    5) Raid doesn't really make sense with a MacBook Air - a RAID involves 2 or more disks being used as if they were one.
    6) Zip drive? No. External hard drive - yes. It isn't a question of if a computer's hard drive will malfunction, it is when. OWC has a nice selection of external drives and the Mac has a built in backup system called TimeMachine. Due to the way TimeMachine works, I've found that your TimeMachine drive should be at least twice as large - and preferably 3-4 times as large as the data you are backing up.
    7) if your printer works and it has Mountain Lion drivers, why replace it?
    8) Online banking is done with a browser - Use Safari or FireFox
    9) If trading files with Windows users is important Mac: Office is your best bet. If not, iWork, Mac:Office, or LibreOffice are all good possibilities.
    10) you can only buy Mt Lion via the App Store.

  • Some questions about configuration in MAX.

    Hello,everyone!
    I have some questions about configuration in MAX(I am a jackaroo for motion control development),I hope I can get your help.
    I use PCI-7344+UMI-7764+Servo amplifier+Servo motor,my MAX version is 4.2 and I use NI-Motion7.5
    My question as following:
    1,In Axis Configuration,for motor type,why I must select stepper but not servo?my motor is servo motor!If I select Servo,my motor can't run,I don't know why.
     If I select stepper,though motor can work but I can't test encoder in MAX.
    2,In Stepper settings,for stepper loop mode,why I must select open-loop but not close-loop?If I select close-loop,the servo motor doesn't work too.
    3,If I want my two servo motors run at different velocity,How shoud I do?It seems I just can set the same velocity in MAX for my two servo motors.
     My English is poor,Pls pardon me!I come from China.
    Thank you for your help!
    EnquanLi
    Striving is without limit!

    Hi,Jochen,
    Thank you for your kindly help!
    The manufacturer of the drive and motor that I am using now is Japan SANYO DENKI,drive type is RS1A01AA,motor type is R2AA06020FXP00.
    And I use position control mode,thehe encoder's counts per revolution is 131072.I set the electronic gear ratio to 1:1 for drive.
    Now,I can use Close-Loop to control the motor but still has some problems.When I configure it to run in closed loop mode, the motors behave strangely and never move to the target position.When I configure it to run in closed loop mode, the motors behave strangely and never move to the target position.The detail situation is as following
    1,Motor can't run.
    2, Or motor moves to a position, then moves in the same direction agian and eventually stops.
    Except for the  two points mentioned above,"Following Error" is  occured frequently,I don't know why.
    I am still not clear why I must set the motor type be stepper in MAX .
    And I have another question:what the relationship between the steps and the counts?They have the proportion relations?I notice that there are a section said like this in help document: For proper closed-loop and p-command operation, steps per revolution/counts per revolution must be in the range of 1/32,767 < steps/counts < 32,767. An incorrect counts to steps ratio can result in failure to reach the target position and erroneous closed-loop stepper operation.
    I am verry sorry I have too many questions!
    I am very appreciate for your kingly help!Thanks again!
    EnquanLi
    China
    Striving is without limit!

  • Few questions about mac pro before buying

    Hello all!
    I may be buying a mac pro in a month or so and have a few questions about it.
    1. ) Any one know when Apple may release the latest mac pro? Don't wanna buy some thing that'll be significantly obsolete in a few days
    2. ) Is it possible to use SATA optical drives internally? I have a SATA blu ray drive I'd like to take from my PC, if that's possible.
    3. ) Is it possible to get a graphics cards better than the 8800 GT for video games? (For use in OS X)
    4. ) Finally, is there a significant performance difference between Apple's seemingly super expensive RAM and 3rd party RAM? (Other than the heat syncs)
    Thanks for any replies.

    1. We have no idea when Apple will release any product until it's released. This is a user-to-user site so we have no more information about future products than you do.
    2. Yes, it's possible. There are two additional SATA ports on the motherboard.
    3. The only graphic cards are those provided by Apple when you order the computer as well as the non-Apple supplied ATI HD-3870 Mac/PC card. The 8800 and 3870 have close performance specs. You can find some benchmarks at Bare Feats.
    4. There's no difference between the RAM Apple installs and what you can purchase on the open market. As long as the RAM meets the required specifications and has the requisite heat sink it will work just fine.

  • I want to question about the official service at the service center of Sony.

    I want to question about the official service at the service center of Sony.
    long since I like the models and items sony. from start playstation, cameras, camcorders up, I've ever had. and a new camera that I bought two years ie compact cameras Sony Cybershot DSC H200. as of a month ago, a camera was having problems in lenses that would not close. and setting the automatic mode to move by itself. I came to the Sony Service Center in Makassar, precisely on Jl. Shop Pengayomann A5 / 05 (0411) 442340.
    operator initially said only two weeks to work on my camera. but this week has been more dau even want to go in a month tomorrow, dated July 9, no news from the service center. and I kept the call to the office service. as well as assorted reasons. there are no spare parts or technical constraints, and the last one I call to his office, he said the factory spare part is damaged. imported directly from Singapore. I think, ko new spare part it can be damaged before using that? how the quality of this Sony spare part? ugly? not good? why?
    I was disappointed with this situation, where soon it will Eid, want to return home as well to Java. but the camera has not been settled workmanship?
    nah, roughly what is the solution of the Sony plagued with this problem? please help, because he did not know to whom to complain. operator had just said: it's up to the father alone.
    once again I asked for his help. solution. if you can before Eid arrived.
    Thank you,
    AD. Rusmianto

    Hi awwee107, 
    Welcome to the Sony Community! 
    We have forwarded your query to the relevant team for their further assistance and someone from local CC will contact you.
    Thanks!
     

  • Important conceptual question about Application Module, Maximum Pool Size

    Hello everyone,
    We have a critical question about the Application Module default settings (taking the DB connections from a DataSource)
    I know that on the Web it is generally suggested that each request must end with either a commit or rollback when executing PL/SQL blocks "directly" on the DB without the framework BC/ViewObject/Entity service intervention.
    Now, for some reasons, we started to develop our applications with thinking that each Web Session would reference exactly one DB session (opened by any instance taken from the AM pool) for the whole duration of the session, so that the changes made by each Web session to its DB session would never interfere with the changes made by "other" Web Sessions to "other" DB sessions .
    In other words, because of that convincement we often implemented sort of "transactions" that open and close (with either commit or rollback) each DB session not in/after a single HTTP request, but during many HTTP Requests.
    As a concrete example think of this scenario:
    1. the user presses the "Insert" button. An HTTP request is fired. The action listener is executed and ends up with inserting rows in a table via a PL SQL block (not via the ViewObjects API).
    2. no commit or rollback after the above PL/SQL block is done yet.
    3. finally the user presses a "Commit" or "Rollback" button, firing the call to the appropriate AM methos.
    Those three requests consist of what I called "transaction".
    From the documentation it's clear that there is no guarantee that the couple AM istance + DB session is the same during all the requests.
    This means that, during step 2, it's possible that another user might reference the same "pending" AM/DbSession for his needs and "steal" somehow the work done via PL/SQL after step 1. (This happens because sessions taken by the pool are always rolled back by default.)
    Now my question is:
    Suppose we set the "Maximum Pool Size" parameter to very a great number (always inferior to the maximum number of concurrent users):
    Is there any guarantee that all the requests will be isolated in that case?
    I hope the problem is clear.
    Let me know if you want more details.

    Thanks for the answers.
    If I am right, from all your answers about resource avaiability, this means that even supposing the framework is able to always give us the same AM instance back from the AM pool (by following the session-affinity criterias), there is, however, no "connection affinity" with the connections from the DataSource. This means that the "same AM instance" might take the "a new DB connection", if necessary, from the connection pool of the DataSource. If that happens, that could give us the same problems as taking "a new AM instance" (that is, not following session-affinity) from the beginning, since each time an a new connection is taken (either via a new AM instance or via the same AM instance plus a new DB connection), the corresponding DB session is rolle back by default, clearing all the pending transactions we might have performed before with direct PL/SQL calls bypassing the AM services during the life cycle of our application, so that the new HTTP request will have a clean DB session to start to work with.

  • Question about ERMS push

    Hi Guru,
    I am prototyping the ERMS push solution in CRM7 and have some questions about the solution SAP help provided.
    Below is the detail about ERMS push:
    Here the e-mail is first handled by the e-mail pull mechanism: it is converted into a
    SAPoffice mail and analyzed by ERMS to find out more details about the mail (like language and certain keywords).
    Then the mail (including the additional information from the ERMS analysis) is transferred to the
    CMS (Communication Management Software). The CMS determines the appropriate agent team and
    dispatches the mail via the push process to an available agent of that team.
    Below is the sap help link:
    http://help.sap.com/saphelp_crm70/helpdata/EN/0e/6a22b86821468691bd5abb51dfd81e/content.htm
    I have below questions about the solution in the help link:
    1. It mentioned about the email profile (set the agent inbox as email provider) and I changed the u201Cdefaultu201D profile delivered by sap. I setup the rule policy according to the help and assigned it in the service manager profile. The purpose of ERMS push is to push email to CMS instead of sending to agent inbox using ERMS. Which business role should this email profile be assigned to? Is it IC_agent?
    2. The help also mentioned about setup u201CERMS_ACTIONu201D as communication system ID in CRMM_BCB_ADM. Does this ID need to be added in the CMS profile? If so, which business role should this CMS profile be assigned to? Is it IC_Agent?
    3. The ERMS uses workflow WS00200001. After the email is pushed to CMS, what status should the workflow be, in progress or complete? Also does it suppose to have agent assigned in the workflow task?
    4. After the CMS pushes the email back to CRM, it will be a pop up for agent to accept or reject. Will it create an interaction record once the agent clicks the accept?
    It would be great if you could shed some light on this.
    Thanks in advance!
    Zhi Jie Kong
    Edited by: Zhijie Kong on Apr 28, 2011 4:32 PM
    Edited by: Zhijie Kong on Apr 28, 2011 4:47 PM

    Hello Zhijie,
    Let me see if I can help address some of your questions.
    1) It doesn't matter which business role you use. You can copy IC_AGENT for example. The important thing is, as Mariusz mentions in this thread, [ERMS email push: problem with CAD and transfer;,your E-Mail profile must be set for E-Mail Provider = 2 (Agent Inbox).
    2) No, this ID itself does not need to be added to any business role (as I assume it is hardcoded in the SAP workflow as Mariusz mentions).
    3) From what I remember, the ERMS Push emails are not set to complete by the system, and therefore can still get inadvertantly routed to agents! I recommend to have a second rule in your Rule Modeler policy to route the ERMS Push emails to a special, separate queue where you can close them out easily without worrying about them getting assigned to any agents!
    4) Yes, the email will arrive like a phone call with the accept/reject buttons flashing (though it will show as an email, not a phone call). And yes, when the agent accepts an Interaction Record will be created by the system automatically.
    I hope this helps you!
    Regards,
    John

  • Questions about my PDF portfolio.

    I have only a few questions about a CD portfolio I am designing with Acrobat Professional (8.0)
    There were a few things i couldn't figure out on my own.
    I have about 15-20 pieces to show on CD, but there is no web design involved, so I couldn't use my own web site layout to just throw onto CD, out of that convenience.
    1) How do you make sure the PDF will always opens at the size you want?
    For example, whenever I set the document at actual size (100% view) I close and open the document, and it reopens at a random size, such as 317 percent.
    WTH?
    2) Where can I find examples of design portfolios that were designed in Acrobat? Everyone's portfolio is online these days, which is not my style.
    3) Is it possible to make a 'thumbnail view' on the first PDF page (like you would see in a gallery on a website) that links from that page to any one of the 15-20 pieces?
    Any advice is much appreciated.

    Fender77 wrote:
    1. i think you will have to shutt it off within settings, if the javagame won't let you turn it off temporary. Don't you find keytones annoying?
    Guess thats what ill do
    I also found another stuipd thing in some Java games the phone still has the tilt sensor active in games and software.
    Some games end up with graphic glitches forcing you to restart them, some display a message saying its unsupported and some support it partially (The number keys for navigation stay like they are in portrait which is of course messed up (The phone seems to change the navigation keys internally though so that does work)

  • Basic questions about programing for J9 VM

    I need to create a java application to run on a Pocket PC 2003 OS and I'm limited to using IBM's Websphere J9 Virtual Machine. I'm new to using java in this capacity and therefore have lots of questions which I'm guessing are pretty basic. Despite my best efforts, I've found very little to help me online. Below are a couple questions I have that I'm hoping someone can help me with. Even better, if you know of any resources that could help me with these and other questions, I'd love to have them. Thanks in advance.
    1. I'm using standard AWT for the GUI but I'm having problems getting frames, dialogs, etc., to come up in anything less then full screen. setSize() and resize() have no effect, even if I extend the frame and override the setMinimumSize, setPreferredSize, setMaximumSize methods. What do I need to do to get a child window to appear in something less than full screen?
    2. I'd like to be able to add menu's to the buttom toolbar (with the keyboard) but have no idea how I would add something to it. Can someone point me in the right direction?
    3. When my application gets an iconified event I go ahead and call a System.exit() to exit the application. This doesn't kill the java VM though, which continues to run in the background (taking up plenty of memory). If I run my application using the J9w.exe so that it runs without the console, then not only does the VM continue to run, but I have no way to stop it (the running program list can't see it). Since each time I run my application it starts a new VM, it only takes a couple of times before I'm out of memory and have to do a soft reset of the PDA to make things right. Can I kill the VM when I kill my application?
    4. I learn best by looking at example code, but have been unable to find any code people are running on J9. I have the GolfScoreTracker installed and running on my PDA, but the jar file contains only the classes. Since it's supposed to be a demo, I had hoped that the source code would be included, is that hoping too much or is the source code available somewhere? In addition, if you know of any applications out there with available source code that are known to run well on a PocketPC J9 environment I'd appreciate the link.

    Hi there, I saw your questions, im currently developing a java pocket pc application as well and here's what i go so far:
    AWT seem to be hard to use on pocket pc, instead i recommend that you use SWT, which is a technology developed by eclipse. It's already installed on the eclipse plugins, you just need to download the jar and dll files for the pocket pc. They are available at: http://www.eclipse.org/downloads/index.php
    I assume that you already have the J9 working on your device. So you only need to copy the SWT.jar file and the swt-win32-3064.dll to the folder containing the .class files on your device.
    Now, on your java IDE(im using eclipse) Add the SWT.jar library to your project which should be on C:/eclipse/plugins/org.eclipse.swt.win32_3.0.2/ws/win32/swt.jar or something like taht depending on your eclipse root.
    Now you are ready to code some SWT, here is a sample program from Carolyn MacLeod, i modified a few things so it could run on the pocket pc but it's almost the same. Once you coded in eclipse run it, then copy the class file from your desktop to your device(There should be like 4 or 5 classes like sample.class, sample$1.class etc. copy all of them) where you put the jar and dll files(If program does not run you may try to rename the dll file for swt-win32-3050.dll instead of 3064.dll). Now after you have everything set up you need to create the lnk file in order to run the program. On your desktop create a new textfile and write the following on it:
    255#"\Archivos de Programa\J9\PPRO10\bin\j9w.exe" "-jcl:PPRO10" "-cp" "\My
    Documents\Java\swt.jar" ;\My Documents\Java" sample
    Paths depend on your install, and the place where you put your classes and jar file. path for j9w is usually "\Program Files\J9\PPRO10\bin\j9w.exe", and the last word should be the classname.
    Currently this form only displays an image on a canvas, click on the browse button and choose a pic and it will display on the canvas. Im trying to connect the form to an oracle database but no success yet on the device.
    Hope it helps, if you have any questions about the code or something, and I know the answer, please feel free to ask.
    See ya
    import org.eclipse.swt.*;
    import org.eclipse.swt.widgets.*;
    import org.eclipse.swt.layout.*;
    import org.eclipse.swt.events.*;
    import org.eclipse.swt.graphics.*;
    public class sample {
    static Shell shell;
    static Display display;
    static Text dogName;
    static Text textdb;
    static Combo dogBreed;
    static Canvas dogPhoto;
    static Image dogImage;
    static List categories;
    static Text ownerName;
    static Text ownerPhone;
    static String[] FILTER_EXTS = {"*.jpg"};
    public static void main(String[] args) {
    display = new Display();
    shell = new Shell(display, SWT.RESIZE | SWT.CLOSE);
    Menu menu = new Menu(shell, SWT.BAR);
    shell.setText("Dog ShowS Entry");
    shell.setMenuBar(menu);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 3;
    shell.setLayout(gridLayout);
    new Label(shell, SWT.NONE).setText("Dog's NameS:");
    dogName = new Text(shell, SWT.SINGLE | SWT.BORDER);
    GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    gridData.horizontalSpan = 2;
    gridData.widthHint = 60;
    dogName.setLayoutData(gridData);
    new Label(shell, SWT.NONE).setText("Breed:");
    dogBreed = new Combo(shell, SWT.NONE);
    dogBreed.setItems(new String [] {"Collie", "Pitbull", "Poodle", "Scottie"});
    dogBreed.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
    Label label = new Label(shell, SWT.NONE);
    label.setText("Categories");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
    new Label(shell, SWT.NONE).setText("Photo:");
    dogPhoto = new Canvas(shell, SWT.BORDER);
    gridData = new GridData(GridData.FILL_BOTH);
    gridData.widthHint = 60;
    gridData.verticalSpan = 3;
    dogPhoto.setLayoutData(gridData);
    dogPhoto.addPaintListener(new PaintListener() {
    public void paintControl(final PaintEvent event) {
    if (dogImage != null) {
    event.gc.drawImage(dogImage, 0, 0);
    categories = new List(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
    categories.setItems(new String [] {
    "Best of Breed", "Prettiest Female", "Handsomest Male",
    "Best Dressed", "Fluffiest Ears", "Most Colors",
    "Best Performer", "Loudest Bark", "Best Behaved",
    "Prettiest Eyes", "Most Hair", "Longest Tail",
    "Cutest Trick"});
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
    gridData.widthHint = 60;
    gridData.verticalSpan = 4;
    int listHeight = categories.getItemHeight() * 12;
    Rectangle trim = categories.computeTrim(0, 0, 0, listHeight);
    gridData.heightHint = trim.height;
    categories.setLayoutData(gridData);
    Button browse = new Button(shell, SWT.PUSH);
    browse.setText("BrowsePic");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    gridData.widthHint = 60;
    browse.setLayoutData(gridData);
    browse.addSelectionListener(new SelectionAdapter() {
         public void widgetSelected(SelectionEvent event) {
              FileDialog dialog = new FileDialog(shell, SWT.OPEN);
              dialog.setFilterExtensions(new String[] {"*.*"});
              String fileName = dialog.open();
    if (fileName != null) {
    dogImage = new Image(display, fileName);
    shell.redraw();
    Button delete = new Button(shell, SWT.PUSH);
    delete.setText("No action");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
    gridData.widthHint = 60;
    delete.setLayoutData(gridData);
    delete.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent event) {
    Button enter = new Button(shell, SWT.PUSH);
    enter.setText("No action");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
    gridData.horizontalSpan = 3;
    enter.setLayoutData(gridData);
    enter.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent event) {
         shell.open();
         while (!shell.isDisposed()) {
              if (!display.readAndDispatch())
                   display.sleep();
         display.dispose();
    if (dogImage != null) {
    dogImage.dispose();
    }

  • Question about opening sockets

    Hello I have some questions about using sockets.
    I made a program which works with sockets.
    I have a class which contains this
    static byte[] send(byte outbuf[], int len, byte recbyt[], long recip[])
            InetAddress dst = InetAddress.getByName(sendip);
            DatagramPacket request = new DatagramPacket(outbuf, len, dst, sendportint);
            DatagramSocket socket = new DatagramSocket();       
    socket.send(request);
      DatagramPacket packet = new DatagramPacket(inbuf, inbuf.length);
    socket.receive(packet);
      }In another class I call this method like this
    for(int i=0;i<rows;i++)
    send(byte outbuf[], int len, byte recbyt[], long recip[])
    }As you can see it opens a socket when sending something but never close. Does this mean that evrytime I call send it opens a new socket??
    So that if rows is 500 after this loop 500 socket are opened??
    When I place close.socket after socket.receive() it works the same. Is this better or not??

    What do you mean with this line
    Method ends, Socket gets GCed and closes on GCDo you mean when the method ends the socket closes??
    And what is GC?

  • Some questions about building  a plug in

    Hello,
    1.I'm trying to build a plug in ( for EM12c release 2 ) for my standalone java application - which exposes mbeans whom i want to collect some metrics with.
    It's been a while since i started to build it - and I asked quite a lot of quesions about it - because the documnets supplied with the EDK and
    the books ( ProgrammersGuide, ProgrammersReferece and the README file ) are not very clear to me ( I'm a newbie with EM in general .. )
    So far some of the questions got answered and were very halpfull with this long process. BUT, there are some questions that nobody answered yet.
    I'm quite "stuck" with it. I'm talking about the questions in : Re: A question about updating metadata files in plug in
    I have a deadline for this plug in ( which is very close ..) so this the reason I post this new message.
    I will appriciate any help about those questions .
    2. Regarding the above, ( hoping to have an answered soon ..) I'm trying another way to buils this plug in:
    In the README file there is this section( 3.6 : using MPCUI ) . I read the programmersReference ( chapter 8 ) and followed the instructions both in the README file and the ProgrammersReference .
    For a begining, I just wanted to modify a small thing in the example supplied ( Demo Host System ) just to get started with something .
    So i modify the file which contains the label ' Select member ... ' ( i don't remember the name of the file since the project is in my office , and I can't copy/paste ..- I think the the file icontians the name ' ConfirmationTarget .xml - it's one of the pages seen while adding a target ) .
    I i changed it , i build the project ( using FlexBuilder) but did not use ANT as it's says in the README - the eclipse IDE build this file automatically
    ( HostSystem.swf  in bin-debug dir as it says in the README ) . I copied this file to stage_dir/oms/metadata/mpcui .
    i build a new plug in ( i incremented the version of it ) - no errors, everty thing was fine .I also copied this file to the oms server ( it wasn't there before )
    and than run the commad ' emctl register oms ...' as it says in section 3.6 - and o got 'Success' eventually .
    Now, when i opened the EM console , hoping to see tge change i made ( again , it's just a change of the title of the step while adding the target , and adding another menuitem to the 3 item that were alreay there ( CPU, FS, etc ) .
    I believe wad i did is right- i mean changing in the right file and place ( there is no title like like this in any oter source file in the whole project )
    but still, I didn't see any change! it seems execatly as it was befoer the change ..
    Any idea?
    Thanks.

    Regarding your question #2. Please read my response here carefully as it covers a number of different issues.
    1. Ant is not required to build the SWF file in your plug-in. It is an OPTION. Section 8.27 describes the different development options using either Ant or FlexBuilder.
    2. You do NOT need to ever copy a SWF file to any location under the OMS runtime. You need to include it in the stage area and then either build an OPAR or use emctl to incrementally update the deployed plug-in. It has to either be deployed as part of the plug-in deployment or updated incrementally using emctl register oms metadata. Section 8.27.2.6 describes the specific steps to do this incremental update.
    Steps to update the SWF associated with demo_hostsample. These are covered in the README and in chapter 8.
    1. deploy the demo_hostsample plug-in as described in the README
    2. create an instance of the Host Sample target type through manually discovery (Add Targets->Add Non-Host Target Specifying Properties)
    3. using the demo_hostsample.zip project in Flex Builder, modify some part of the code, for example, modify the line containing label="Current Status" to label="My New Label"
    4. rebuild the SWF, to be sure you can to a Clean build of the demo_hostsample project
    5. ensure there is an updated copy of the HostSample.swf under demo_hostsample\mpcui\bin-debug (NOT bin-release, unless you Exported A Release Build)
    6. copy that updated HostSample.swf file to the location on the OMS machine where you unzipped and built the OPAR for the demo_hostsample plug-in
    7. cd to the stage/oms/metadata/mpcui directory and replace the current HostSample.swf with the one you just built (BE SURE ITS THE UPDATED FILE)
    8. execute the command "emctl register oms metadata -sysman_pwd sysman -pluginId oracle.sysman.ohs -service mpcui -file demo_hostsample_uimd_swf.xml (BE SURE TO USE THE CORRECT sysman_pwd)
    At this point you should be able to go to the homepage for the Host Sample target you created and see the changes.

  • Question about VB OracleConnection

    Hi all,
    I would like to open an OracleConnection in my VB code and then call another vb function (in order to maintain good modular programming standards) within the same program using the same oracle connection whenever I try this I get a no connection open type of error.
    So just to be clear, can I pass the connection between sub procedures and functions in order to not have to open and close a bunch of connections?

    Sen,
    Your question seems to be related to one of your previous postings in the Measurement Studio for Visual Basic Discussion Forum. Whenever you have further questions about the same issue, instead of posting a brand new question, you can simply add a "Comment" to the reply you got (by clicking on "Comment on this answer"). Here's a link to your previous posting where you can do this:
    how can i control the DAQ directly from VB
    Besides, you'll have a better chance of getting an answer in the Measurement Studio for Visual Basic Discussion Forum since the question is related to that product.
    Regards,
    Ca
    rlos L

  • NetBean Questions about Features

    Hi I just some questions about netbeans.
    First is there an option to change tabs into soft tabs(I need to change a tab to 3 spaces)
    2nd Is there a way to display white spaces? so you can see what has been whitespaced or not
    3rd is there a way to make it so when you put a bracket in it puts right away the closeing bracket in?
    4th is there a way to have like the area where it complies to auto hide itself till I hit complie then it pops up(Since if there was a feature or something close to it would give me some more working space).
    Thats all the questions I got for now
    thxs

    These are all questions that can best be answered by experimentation and reading the built-in help, especially since you don't say what NB version you're using.
    However, for NB 5.0:
    Hi I just some questions about netbeans.
    First is there an option to change tabs into soft
    tabs(I need to change a tab to 3 spaces)Yes, in Tools | Options change the value for whatever editor you want changed.
    >
    2nd Is there a way to display white spaces? so you
    can see what has been whitespaced or notNot that I know of.
    >
    3rd is there a way to make it so when you put a
    bracket in it puts right away the closeing bracket
    in?Yes, select the Insert Closing Brackets Automaticaly in Editor Options.
    >
    4th is there a way to have like the area where it
    complies to auto hide itself till I hit complie then
    it pops up(Since if there was a feature or something
    close to it would give me some more working space).It does that, experiment to find out how it works.
    >
    Thats all the questions I got for now
    thxs

  • Questions about Real Application Testing(RAT)

    Hi All,
    We have a production database running on 10gR3 on a server with local drives, while we have a Oracle 11gR2 DB running on a server with NFS mounts (using S7310 - AmberRoad) i.e. Faster and better storage.
    We captured the load on 10gR3 and replayed it on 11gR2. We noticed the following:
    (1) Replay is considerably slow even though Oracle11gR2 instance has a faster storage. We suspect that it may be something to do with the buffer cache / SGA because there is nothing in cache on the target (we didn't shutdown 10gR2 DB for capture) – what should we do then?
    (2) To make sure that we can take the advantage of cache, we replayed the load 2nd time right after the 1st replay and everything ran to our surprise. So we are wondering how’s that possible since we did not restore the DB as we do not want to wipe off the cache (chicken and egg situation)? Does Oracle rollback the changes after the replay?
    (3) Do we have to restore database on Target every time we do replay? But if we do that then we won't have anything in the SGA.
    So we need your advise and also would like to know how everyone else is doing this testing?
    Regards,
    RJiv.

    DB Replay's workload capture facility allows you to either start capture from a closed (mounted) database (capture starts upon opening the DB), or to begin capture mid-stream during normal activity. Starting capture on the production system from a closed database eliminates the divergence in performance resulting from a primed cache, as well as possible data divergence issues from open, partially-completed transactions at the time the capture started.
    For many customers, it will clearly not be possible to close their database during peak periods (!!)
    One way to address the cache priming issue is to start capture in production from a closed state during a low period of activity, and the allow capture to run through the peak period.
    Another approach is to start capture mid-stream with the DB open and to run capture for a long period (long enough to stabilize the cache). When performing the replay, begin a new AWR snapshot after the cache has stabilized.
    Your question about running the replay again after the first replay is done is confusing. Of course you will not get meaningful data from that, since replay must begin from the capture start SCN. If you run replay twice in a row without reverting the database to the capture start SCN, it will be applying meaningless changes to a database in a state that is unlike that of the original. You will be testing the data errors codepath instead of real performance.
    It is typical to enable database flashback on the repay database so that it can be repeatedly reverted to the capture start SCN for testing under a variety of scenarios.
    Regards,
    Jeremiah Wilton
    Blue Gecko, Inc.
    http://www.bluegecko.net

Maybe you are looking for

  • Advice needed on backup config. for Mac and Windows XP

    I'm trying to work out my best options for configuring a way to backup both my Mac and XP machines and at the same time use a hard-drive as a type of media server (or at least somewhere to hold shared photos etc). Current hardware is: - MacBook conne

  • Error Message, The installer database is corrupt.

    I get the error message, "The installer database is corrupt" when I try to install Photoshop CS3 on my new computer with Windows 8.

  • How to Achieve "POPIN in TreeByKeyTableColumn" ?

    Hello, SAP online help for NW 7.01 say's its not possible to have cell popin's in TreeByKeyTableColumn [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fc/501b42b5815133e10000000a155106/frameset.htm] But is there a way we can develop using POPIN wit

  • File Loaction in m_binder Object

    Hi All, I wanted to know where(in which variable) content is stored in the m_binder object. e.g when we call a GetFile service, the content is retrieved but even when I debugged the UCM, I could not find the location of the place from where content i

  • CS2 to CS4 Script Migration...

    Forgive me if this is answered elsewhere, but I can't seem to find reference to it... Is there a conversion guide, cross-reference list, or utility that will help migrate InDesign CS2 VBScripts so that they can run under CS4? Thanks!