Accessing Another Window Fault

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Arrays;
public class PasswordDemo extends JPanel   implements ActionListener {
    private static String OK = "ok";
    private static String HELP = "help";
    private JFrame controllingFrame; //needed for dialogs
    private JPasswordField passwordField;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    public PasswordDemo(JFrame f) {
        //Use the default FlowLayout.
        controllingFrame = f;
        //Create everything.
        passwordField = new JPasswordField(10);
        passwordField.setActionCommand(OK);
        passwordField.addActionListener(this);
        JLabel label = new JLabel("Enter the password: ");
        label.setLabelFor(passwordField);
        JComponent buttonPane = createButtonPanel();
        //Lay out everything.
        JPanel textPane = new JPanel(new FlowLayout(FlowLayout.TRAILING));
        textPane.add(label);
        textPane.add(passwordField);
        add(textPane);
        add(buttonPane);
    protected JComponent createButtonPanel() {
        JPanel p = new JPanel(new GridLayout(0,1));
        JButton okButton = new JButton("OK");
        JButton helpButton = new JButton("Help");
        okButton.setActionCommand(OK);
        helpButton.setActionCommand(HELP);
        okButton.addActionListener(this);
        helpButton.addActionListener(this);
        p.add(okButton);
        p.add(helpButton);
        return p;
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if (OK.equals(cmd)) { //Process the password.
            char[] input = passwordField.getPassword();
            if (isPasswordCorrect(input)) {
             //   JOptionPane.showMessageDialog(controllingFrame, "Success! You typed the right password.");      
                 //class BasicPanel extends JPanel {
            //          public BasicPanel() {
                           JButton okButton = new JButton("ok");
                           okButton.addActionListener(new ActionListener() {
                                public void actionPerformed(ActionEvent arg0) {
                                     test2 inputForm = new test2();
                                     inputForm.setVisible(true);
                           add(okButton);
                 class test2 extends javax.swing.JFrame {
                     public test2() {
                         initComponents();
                     private void initComponents() {
                         jPanel1 = new javax.swing.JPanel();
                         jButton1 = new javax.swing.JButton();
                         jButton2 = new javax.swing.JButton();
                         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
                         jButton1.setText("jButton1");
                         jButton2.setText("jButton2");
                         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
                         jPanel1.setLayout(jPanel1Layout);
                         jPanel1Layout.setHorizontalGroup(
                             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addGroup(jPanel1Layout.createSequentialGroup()
                                 .addContainerGap()
                                 .addComponent(jButton1)
                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                 .addComponent(jButton2)
                                 .addContainerGap(196, Short.MAX_VALUE))
                         jPanel1Layout.setVerticalGroup(
                             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addGroup(jPanel1Layout.createSequentialGroup()
                                 .addContainerGap()
                                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                     .addComponent(jButton1)
                                     .addComponent(jButton2))
                                 .addContainerGap(174, Short.MAX_VALUE))
                         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                         getContentPane().setLayout(layout);
                         layout.setHorizontalGroup(
                             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addGroup(layout.createSequentialGroup()
                                 .addContainerGap()
                                 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                 .addContainerGap(24, Short.MAX_VALUE))
                         layout.setVerticalGroup(
                             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addGroup(layout.createSequentialGroup()
                                 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                 .addContainerGap(92, Short.MAX_VALUE))
                         pack();
                     }// </editor-fold>
                      * @param args the command line arguments
                     // Variables declaration - do not modify
                     private javax.swing.JButton jButton1;
                     private javax.swing.JButton jButton2;
                     private javax.swing.JPanel jPanel1;
                     // End of variables declaration
           else {
                JOptionPane.showMessageDialog(controllingFrame,
                    "Invalid password. Try again.",
                    "Error Message",
                    JOptionPane.ERROR_MESSAGE);
            //Zero out the possible password, for security.
            Arrays.fill(input, '0');
            passwordField.selectAll();
            resetFocus();
        } else { //The user has asked for help.
            JOptionPane.showMessageDialog(controllingFrame,
                "You can get the password by searching this example's\n"
              + "source code for the string \"correctPassword\".\n"
              + "Or look at the section How to Use Password Fields in\n"
              + "the components section of The Java Tutorial.");
     * Checks the passed-in array against the correct password.
     * After this method returns, you should invoke eraseArray
     * on the passed-in array.
    private static boolean isPasswordCorrect(char[] input) {
        boolean isCorrect = true;
        char[] correctPassword = { 'b', 'u', 'g', 'a', 'b', 'o', 'o' };
        if (input.length != correctPassword.length) {
            isCorrect = false;
        } else {
            isCorrect = Arrays.equals (input, correctPassword);
        //Zero out the password.
        Arrays.fill(correctPassword,'0');
        return isCorrect;
    //Must be called from the event dispatch thread.
    protected void resetFocus() {
        passwordField.requestFocusInWindow();
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event dispatch thread.
    private static void createAndShowGUI() {
        //Create and set up the window.
        JFrame frame = new JFrame("PasswordDemo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Create and set up the content pane.
        final PasswordDemo newContentPane = new PasswordDemo(frame);
        newContentPane.setOpaque(true); //content panes must be opaque
        frame.setContentPane(newContentPane);
        //Make sure the focus goes to the right component
        //whenever the frame is initially given the focus.
        frame.addWindowListener(new WindowAdapter() {
            public void windowActivated(WindowEvent e) {
                newContentPane.resetFocus();
        //Display the window.
        frame.pack();
        frame.setVisible(true);
    public static void main(String[] args) {
        //Schedule a job for the event dispatch thread:
        //creating and showing this application's GUI.
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                //Turn off metal's use of bold fonts
          UIManager.put("swing.boldMetal", Boolean.FALSE);
          createAndShowGUI();
}Hey there everyone, i am trying to access another window using swing. I am trying to do so via password verification, when the use inputs the right password it should grant them access to the form fillout page which i am building. Problem is that there is something wrong when i input the right password and click "OK". Its not going through and giving me access to the next page. I just need pointers as to what i should fix. Thank you very much.

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Arrays;
/* PasswordDemo.java requires no other files. */
public class PasswordDemo extends JPanel
                          implements ActionListener {
    private static String OK = "ok";
    private static String HELP = "help";
    private JFrame controllingFrame; //needed for dialogs
    private JPasswordField passwordField;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    public PasswordDemo(JFrame f) {
        //Use the default FlowLayout.
        controllingFrame = f;
        //Create everything.
        passwordField = new JPasswordField(10);
        passwordField.setActionCommand(OK);
        passwordField.addActionListener(this);
        JLabel label = new JLabel("Enter the password: ");
        label.setLabelFor(passwordField);
        JComponent buttonPane = createButtonPanel();
        //Lay out everything.
        JPanel textPane = new JPanel(new FlowLayout(FlowLayout.TRAILING));
        textPane.add(label);
        textPane.add(passwordField);
        add(textPane);
        add(buttonPane);
    protected JComponent createButtonPanel() {
        JPanel p = new JPanel(new GridLayout(0,1));
        JButton okButton = new JButton("OK");
        JButton helpButton = new JButton("Help");
        okButton.setActionCommand(OK);
        helpButton.setActionCommand(HELP);
        okButton.addActionListener(this);
        helpButton.addActionListener(this);
        p.add(okButton);
        p.add(helpButton);
        return p;
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if (OK.equals(cmd)) { //Process the password.
            char[] input = passwordField.getPassword();
            if (isPasswordCorrect(input)) {
             //   JOptionPane.showMessageDialog(controllingFrame,
             //       "Success! You typed the right password.");
                  jLabel1 = new javax.swing.JLabel();
                 jLabel2 = new javax.swing.JLabel();
                 jLabel3 = new javax.swing.JLabel();
                 jTextField1 = new javax.swing.JTextField();
                 jTextField2 = new javax.swing.JTextField();
                 jTextField3 = new javax.swing.JTextField();
                 jLabel1.setText("Name: ");
                 jLabel2.setText("Age: ");
                 jLabel3.setText("Height: ");
                 jTextField1.setText("jTextField1");
                 jTextField2.setText("jTextField2");
                 jTextField3.setText("jTextField3");
                 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                 getContentPane().setLayout(layout);
                 layout.setHorizontalGroup(
                     layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(layout.createSequentialGroup()
                         .addGap(23, 23, 23)
                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addGroup(layout.createSequentialGroup()
                                 .addComponent(jLabel1)
                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                 .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                             .addGroup(layout.createSequentialGroup()
                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                     .addComponent(jLabel2)
                                     .addComponent(jLabel3))
                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                     .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                     .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                         .addContainerGap(274, Short.MAX_VALUE))
                 layout.setVerticalGroup(
                     layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(layout.createSequentialGroup()
                         .addGap(23, 23, 23)
                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                             .addComponent(jLabel1)
                             .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                             .addComponent(jLabel2)
                             .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                             .addComponent(jLabel3)
                             .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                         .addContainerGap(205, Short.MAX_VALUE))
                 pack();
            } else {
                JOptionPane.showMessageDialog(controllingFrame,
                    "Invalid password. Try again.",
                    "Error Message",
                    JOptionPane.ERROR_MESSAGE);
            //Zero out the possible password, for security.
            Arrays.fill(input, '0');
            passwordField.selectAll();
            resetFocus();
        } else { //The user has asked for help.
            JOptionPane.showMessageDialog(controllingFrame,
                "You can get the password by searching this example's\n"
              + "source code for the string \"correctPassword\".\n"
              + "Or look at the section How to Use Password Fields in\n"
              + "the components section of The Java Tutorial.");
     * Checks the passed-in array against the correct password.
     * After this method returns, you should invoke eraseArray
     * on the passed-in array.
    private static boolean isPasswordCorrect(char[] input) {
        boolean isCorrect = true;
        char[] correctPassword = { 'b', 'u'};
        if (input.length != correctPassword.length) {
            isCorrect = false;
        } else {
            isCorrect = Arrays.equals (input, correctPassword);
        //Zero out the password.
        Arrays.fill(correctPassword,'0');
        return isCorrect;
    //Must be called from the event dispatch thread.
    protected void resetFocus() {
        passwordField.requestFocusInWindow();
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event dispatch thread.
    class test2 extends javax.swing.JFrame {
        public test2() {
            initComponents();
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("jButton1");
            jButton2.setText("jButton2");
            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jButton1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jButton2)
                    .addContainerGap(196, Short.MAX_VALUE))
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton1)
                        .addComponent(jButton2))
                    .addContainerGap(174, Short.MAX_VALUE))
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(24, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(92, Short.MAX_VALUE))
            pack();
        }// </editor-fold>
         * @param args the command line arguments
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration
    private static void createAndShowGUI() {
        //Create and set up the window.
        JFrame frame = new JFrame("PasswordDemo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Create and set up the content pane.
        final PasswordDemo newContentPane = new PasswordDemo(frame);
        newContentPane.setOpaque(true); //content panes must be opaque
        frame.setContentPane(newContentPane);
        //Make sure the focus goes to the right component
        //whenever the frame is initially given the focus.
        frame.addWindowListener(new WindowAdapter() {
            public void windowActivated(WindowEvent e) {
                newContentPane.resetFocus();
        //Display the window.
        frame.pack();
        frame.setVisible(true);
    public static void main(String[] args) {
        //Schedule a job for the event dispatch thread:
        //creating and showing this application's GUI.
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                //Turn off metal's use of bold fonts
          UIManager.put("swing.boldMetal", Boolean.FALSE);
          createAndShowGUI();
}Alright so i applied what you told me and tried to insert a new JFrame window with buttons and text fields. But i keep getting errors getContentPane() and the pack() in the end. I really can't figure out whats causing the error.
Edited by: 860597 on May 22, 2011 3:37 PM

Similar Messages

  • When I try to open a site I normally access i'm getting a bar that says,Firefox has blocked this site from opening another window then on the right side of the bar gives option to allow or not. Never did that before. Thanks

    When I try to open a site I normally access i'm getting a bar that says,Firefox has blocked this site from opening another window then on the right side of the bar gives option to allow or not. Never did that before. Thanks

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Accessing Files/Registry on another Windows server

    Hi there,
    I'm kind of new to Java. I would like to write a program that can read a text file (or registry entry) located on another Windows server. What is the best way to do this, eg. what java classes would I need? When reading text files, I would like to use the syntax, eg. \\[machine name]\c$\textfile.txt. Is this possible?
    thanks,
    Pi

    Hi there,
    I'm kind of new to Java. I would like to write a
    program that can read a text file (or registry entry)
    located on another Windows server. What is the best
    way to do this, eg. what java classes would I need?
    When reading text files, I would like to use the
    syntax, eg. \\[machine name]\c$\textfile.txt. Is
    this possible?
    thanks,
    PiAny directory path which you can access from the OS can be accessed in Java, so if \\[machine name]... is accessible, yes. However, that speaks nothing of the design of your app, which may be on the 'wonky' side.

  • How can I disable remote access connection window ?

    When I try to connect (via TCP/IP) with a VI in another PC (in my local network) it appears the remote access connection window.
    How can I disable this (programmatically if possible) ?
    A big thanks for your answers.
    Linus

    Randy,
    attached the image of the Remote Access Connection Window that appears when I connect to the VI.
    It is the Operating System (Windows) classical panel for Remote Access connections using a modem.
    Many thanks.
    Linus
    Attachments:
    Remote_Access.jpg ‏22 KB

  • How can I disable the access to windows 2000(O.S.) from LabView?

    I need to disable the access to windows when an application (exe), created by LabView, is running. When the application is running, the user can not acces to windows (for example, execute another application) until he stops the application.
    I am using LabView 6.1 and windows 2000
    Many Thanks

    Hi Francesc,
    There are a couple of options for this. One of them could be calling Windows OS activex components and making the Desktop invisible through labVIEW and then bringing it back on after the LabVIEW execution is stopped.
    The other option is to modify user settings on the target machine. I have tried this on windows 2000 and it works.
    Run "gpedit.msc" from your start menu. In the Group Policy template choose the user configuration that you wish to make the settings for. Expand User Configuration , expand Administrative Templates , and then expand System. Choose 'Custom user interface'
    In this panel select 'Enabled' and enter the interface file name, in this case C:\Program Files\National Instruments\Labview 6.1.exe. (or your own filepath\App
    lication.exe). Reboot the machine.
    This replaces the default windows shell (explorer.exe) with your LabVIEW executable. When the operator logs on, the only thing on his screen is the Labview application. No desktop, no taskbar, no start button.
    This can also be done through LabVIEW using register-level programming. But it would be a more complex approach.
    Hope this helps.
    Regards,
    Pravin Borade
    Applications Engineer, National Instruments

  • How can I access another class in a MembershipRule's Expression

    Hello,
    I want to create an InstanceGroup using Module Microsoft.SystemCenter.GroupPopulator.
    I need to collect all Logical Disks which contain an MS SQL DB Log File.
    I would start as follows:
    <DataSource ID="DS" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
      <RuleId>$MPElement$</RuleId>
      <GroupInstanceId>$Target/Id$</GroupInstanceId>
      <MembershipRules>
        <MembershipRule>
          <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.LogicalDisk"]$</MonitoringClass>
          <RelationshipClass>$MPElement[Name="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>     
    <Expression>
            <And>
      <!--
       First Expression
      -->
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <Property>$MPElement[Name="Windows!Microsoft.Windows.LogicalDevice"]/Name$</Property>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
      <!--
        How can I access another class's properties ? 
      -->
                    <GenericProperty>$MPElement[Name="SQL!Microsoft.SQLServer.2008.DBLogFile"]/Drive$</GenericProperty>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <HostProperty>
                      <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]</MonitoringClass>
                      <Property>PrincipalName</Property>
                    </HostProperty>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <GenericProperty>$MPElement[Name="SQL!Microsoft.SQLServer.2008.DBLogFile"]/Drive$</GenericProperty>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
        </MembershipRule>
      </MembershipRules>
    </DataSource>
    In the first expression you "see" my question:
    I want to compare the LogicalDisk's Name Property with the DB Log File's Drive property.
    But how can I access the DB Log File's Drive property in this MembershipRule ?
    Furthermore LogicalDisk and DB Log File must be hosted on the same Windows Computer.
    Would be great if somebody could help.
    Thanks
    Sebastian

    Hi Niki,
    thanks for the idea, but that will not work. $Target/Id$ refers always to the group to be discovered.
    On last week end I was given following idea, hope it will work:
    Step 1
    Collect all the DB SQL Logfile Objects and write computername (PrincipalName?) and Driveletter into a textfile, line by line. Shouldn't be a problem, PowerShell is your friend.
    Step 2
    Read the file from Step 1, build discovery data for each disk drive as object of class "Logical Disk (Server)",
    and then discover the containment-relationships from those Logical Drive(Server) Objects to the InstanceGroup.
    Perhaps I must do it for the OS-Version related Disks, because I need the target classes  of the Logical Disk Freespace monitors. Some more work. "Risks": I donot know the discovery algorithm for the Logical Disk(Server) Objects, but a "deep
    dive" into the MPs should help.
    Thanks to all, who have read.
    I will inform you about progress and success
    sebastian

  • Error 1606%appdata%\ not network access in windows vista

    my OS is windows vista whwn upgrade I get the message the error 1606% appdata% network not found, try to uninstall the program and out another window asking for permission to give access or cancel a program to run if I give back concept adobe reader installed and get the same error appear and if I cancel it just nothing happens can anyone help me thanks ...

    Try the new Microsoft Fixit Center - it may help you fix this error.
    Please note that this software is still beta, so it may be advisable to take a System Restore Point before proceeding.
    Feedback would be appreciated.

  • How to use the 3 button mouse to swipe from one window to another window

    when I use the trackpad in the macbook pro 2010 with 3 fingers, I can easily swipe left or right to another window that I setup one for my home and one for my office work, but I also use a external mouse, keyboard and big display to use the MBP with the lib close, this case how can do this with mouse itself under osx mavericks 10.9.1
    thanks.

    Hi,
            Any data sharing accross views can be achiveved by defining CONTEXT data in COMPONENT CONTROLLER and mapping it to the CONTEXT of all the views. Follow the below steps.
    1. Define a CONTEXT NODE in component controller
    2. Define same CONTEXT NODE in all the views where this has to be accessed & changed.
    3. Go to CONTEXT NODE of each view, right click on the node and choose DEFINE MAPPING.
    This is how you map CONTEXT NODE and same can be accessed/changed from any VIEW or even from COMPONENT CONTROLLER. Any change happens at one VIEW will be automatically available in others.
    Check the below link for more info regarding same.
    [http://help.sap.com/saphelp_nw04s/helpdata/EN/48/444941db42f423e10000000a155106/content.htm]
    Regards,
    Manne.

  • I cannot re-open Firefox, or open another window, without rebooting

    I get a message indicating that Firefox is already operating and to either close the program or reboot. I cannot access the supposedly open program, nor can I open another window. I am using Windows 7. The problem repeats itself even after rebooting.

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    *https://support.mozilla.com/kb/Firefox+hangs

  • Executing JavaScript Embeded in a Servlet From another Window

    I'm trying to access an object in a Servlet page from another window in a
              frameset. I'm getting an Access denied Error. Can anyone help?
              Very Urgent..
              

    Thanks for the reply.
    So if I have a method in my DAO class called login() and I want to call it from my control servlet, what would the syntax be ?
    getrequestdispatcher.include(newDAO.login())
    where newDAO is an instance of the class DAO, would that be correct ?? I'd simply pass the request object as a parameter in the login method and to retrieve the results of login() the requestdispatcher.include method will return whatever I set as an attribute to the request object, do I have that right ?!!!!
    Kevin

  • Clicking on a link to access another page or site does not work.

    This condition exists for all sites including e-mails requiring a click to access another site.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Another Window Pop up

    Hello,
    I am creating the URL  iview. The web site I am accessing it automatically pops up another window.  Is there any way that it can be prevented to show up the pop up window?
    Fareed

    Hi Fareed,
    I think there could be a way using a new ActiveX WebBrowser Object in an own URLiView:
                    response.write("<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>");
                    response.write("<OBJECT id="WebBrowser1" classid="clsid:8856F961-340A-11D0-A96B-00C04FD705A2" width="100%" height="100%" border="0">n");
                    response.write("<param name="ExtentX" value="23389">n");
                    response.write("<param name="ExtentY" value="15425">n");
                    response.write("<param name="ViewMode" value="0">n");
                    response.write("<param name="Offline" value="0">n");
                    response.write("<param name="Silent" value="0">n");
                    response.write("<param name="RegisterAsBrowser" value="0">n");
                    response.write("<param name="RegisterAsDropTarget" value="1">n");
                    response.write("<param name="AutoArrange" value="0">n");
                    response.write("<param name="NoClientEdge" value="0">n");
                    response.write("<param name="AlignLeft" value="0">n");
                    response.write("<param name="NoWebView" value="0">n");
                    response.write("<param name="HideFileNames" value="0">n");
                    response.write("<param name="SingleClick" value="0">n");
                    response.write("<param name="SingleSelection" value="0">n");
                    response.write("<param name="NoFolders" value="0">n");
                    response.write("<param name="Transparent" value="0">n");
                    response.write("<param name="ViewID" value="{0057D0E0-3573-11CF-AE69-08002B2E1262}">n");
                    response.write("<param name="Location" value="" + urlToOpen + "">n");
                    response.write("</OBJECT></td></tr></table>");
    Now, I am not sure if you can set some param that prevents PopUps, but it may be a good starting point for the solution.
    Kind regards
    Francisco

  • Photos from another windows account have appeared on iPod

    I've recently found my images from my windows account have appeared on my mothers ipod despite it being synced to another windows account where the images are not even accessable due to the permissions.
    To ensure that my problem is clear, my images are stored on my account named "John" on my windows desktop PC. My mothers ipod is synced to the account "Mum", where the images are not even accessible from due to it being a limited account.
    The images cannot be deleted on the ipod, and have appeared around two days ago, despite the ipod not being connected to the computer. I can only add the images to another album, or share them.
    In itunes, the checkbox on the photos tab for it to sync it deselected, and so it's not even like they should be syncing any photos at all.

    Even if we don't work out how it has happened, how can I just remove the images? It's vital I remove them as soon as possible as some of the photos were sent to me from my girlfriend and really aren't to be viewed by my 55 year old mother.

  • I can't download firefox. When I click on run, I get a window saying that the author is unknown. When I click on run in the new window, another window says the file is corrupt. What can I do about this?

    I want to have firefox as my default browser. As this is a new laptop, I hasve to download firefox. As per the instructions, I click on "run" to complete the download, but instead of completing the download, a window appears which says that the author is unknown. If I ignore the window and click on run, I get another window which says the file is corrupt and I can't finish the download and have firefox as my browser.
    I have windows 7 and explorer is the default browser and I want to change to firefox, but so far am being prevented from doing so. How can I successfully download firefox?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See also:
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • HT2492 How do I use the calculator widget in another window?

    How do I use the calculator widget in another window?  For ex: if I want to move the calculator to a window that shows prices of products on a web page.  I used to be able to click on the calculator and use it in another window, before I upgraded to OSX. What am i doing wrong?

    I think you have to bring it back up in widgets in a new window, you can set up a hot corner to make tis qciker

Maybe you are looking for

  • Exporting Purchased items from itunes for windows

    I have recently converted to mac and bought a macbook, and have imported the majority of my albums into itunes on the macbook, however i do have some albums purchased through the itunes store which are downloaded to my windows pc, and I want to trans

  • QTVR files not tumbling anymore w/ QT 7.1 standalone

    I am still seing this problem with the latest player (7.1.5). Anyone encoutering the same problem - or even able to play any QTVR with the standalone player? I have some QTVR files generated from a 3D app that won't tumble anymore w/ QT 7.1 standalon

  • How to clear folders added to Desktop & Screensaver?

    Last March, BDAqua wrote that I trash the following preference files in my User/Library to clear the folders I've added to System Preferences' Desktop & Screensaver: 1. /Preferences/com.apple.desktop.plist 2. /Preferences/ByHost/com.apple.screensaver

  • Calling and Publishing Web Service

    Hi, I am new to Web Services in SAP. Got 2 questions regarding this: 1. How do we call a Web Service from SAP? 2. If I want to publish a Web Service in SAP ECC6, what are the required steps? Sorry, haven't had much luck with my searches. Thanks in ad

  • Safari not remembering multiple passwords for one site

    My ffriends and I use safari on my iPhone and thus have multiple login information for one site like facebook. A few months agowe were able to go to a site, start typing in the user name and password, and Safari would show us a highlighted list of th