Need help with my batch code, cant seem to figure out the errors.

Hello all, so as part of my job I have to check a list of shared drives on random servers throughout the world to make sure they are not open. I am trying to make a batch file to check them all at once instead of mapping to each one individually. It would
save a lot of time. So far I got this code with the help of a member of
reddit:
@echo off
:: Ensure Extensions are enabled to avoid silent failure
setlocal EnableExtensions DisableDelayedExpansion
set "Input-Server-List=H:\Desktop\serverlist.txt"
set "Open-Share-List=H:\Desktop\open_shares.txt"
set "Locked-Share-List=H:\Desktop\locked_shares.txt"
:: Create empty files
copy nul "%Open-Share-List%" 1>nul
copy nul "%Locked-Share-List%" 1>nul
:: Test the shares to see if they're online or not
for /f "usebackq delims=" %%S in ("%Input-Server-List%") do @(
pushd "%%~S" 2>nul && (
popd
1>> "%Open-Share-List%" echo %%~S
echo ONLINE -- %%S
) || (
1>> "%Locked-Share-List%" echo %%~S
echo OFFLINE - %%S
echo Testing Complete! Results have been logged to File.
:: Open files in default program (typically notepad.exe)
explorer "%Open-Share-List%"
explorer "%Locked-Share-List%"
:: End of script
endlocal
timeout -1 /nobreak
exit /b
But there are a few (approx 4) servers that are coming up as online/accessible in the list that are actually closed/appropriately locked down. I have no idea why.. all the rest are working as they should. Any help would be much appreciated. Any questions
let me know. Once again, I would really really appreciate some help.

Here's a tester:
Get-Content .\shareList.txt | ForEach {
$share = $_
If (Test-Path -Path $share) {
$found = $true
} Else {
$found = $false
try {
$null = Get-ChildItem -Path $share -ErrorAction Stop
$connect = $true
} catch {
$connect = $false
$props = @{
Share = $share
Found = $found
Connect = $connect
New-Object PsObject -Property $props
} | Select Share,Found,Connect |
Sort Connect,Share |
Export-Csv .\shareListCheck.csv -NoTypeInformation
As the others have pointed out though, this won't really give you any solid information.
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing)

Similar Messages

  • Need help with a activation code for Adobe Acrobat X Standard for my PC,, Don't have older version serial numbers,  threw programs away,  only have Adobe Acrobat X Standard,  need a code to unlock program?

    Need help with a activation code for Adobe Acrobat X Standard for my PC, Don't have older Version of Adobe Acrobat 9, 8 or 7. 

    You don't need to install the older version, you only need the serial number from your original purchase. If you don't have them to hand, did you register? If so, they should be in your Adobe account. If not you really need to contact Adobe, though it isn't clear they will be able to do anything without some proof of purchase etc.

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • I am trying to create a signature with echosign. I cant seem to get to the right screen. Any ideas?

    I want to create my signature with Echosign, but I cant seem to get to the right screen. How can I either draw my signature or type it in? thanks.

    George, I respectfully disagree that it related to the document. All documents I receive have the same problem. Again, all I want is to have the options back under the “Place Signature” button to be able to type my signature or draw it. The only thing the button is currently letting me do is  in the screen print below.
    cid:[email protected]

  • Need Help With Simple ABAP Code

    Hello,
    I'm loading data from a DSO (ZDTBMAJ) to an Infocube (ZCBRAD06). I need help with ABAP code to some of the logic in Start Routine. DSO has 2 fields: ZOCTDLINX & ZOCBRDMAJ.
    1. Need to populate ZOCPRODCD & ZOCREFNUM fields in Infocube:
        Logic:-
        Lookup /BI0/PMATERIAL, if /BIC/ZOCBRDMAJ = /BIC/OIZOCBRDMAJ
        then /BIC/ZOCPRODCD = ZOCPRODCD in Infocube
               /BIC/ZOCREFNUM = ZOCREFNUM in Infocube         
    2. Need to populate 0G_CWWTER field in Infocube:
        Logic:
        Lookup /BIC/PZOCTDLINX, if /BIC/ZOCTDLINX = BIC/OIZOCTDLINX
        then G_CWWTER = 0G_CWWTER in Infocube.
    I would need to read single row at a time.
    Thanks!

    I resolved it.

  • My need help with my iphone. i got up yesterday morning and the phone was completely off. Also, is not charging problem because it was charge before that happen.c

    I need help with my iphone. For some reason is off completely and refusing to come on. I believe is not charging problem, because it was charge before that happen.

    You have posted under MacBook Pro.
    I have asked the administrators to relocate this post to the iPhone section where it is more likely to get a helpful response.  

  • Need help with adjusting Javascript code to work in Adobe Edge (Countdown)

    Hello
    Im a newbie when it comes to working with Javascript and Adobe Edge and need a bit of help with adjusting some javascript code to work with Adobe Edge. A friend of mine helped me with making this javascript code: Edit fiddle - JSFiddle
    Its a simple countdown which counts down to a certain time at a certain date. What I aim to do is to add this code as a trigger on a text-element called "countdown" (within a symbol called "count").
    I have tried to do this as the code is, but it does not work. Anyone have any suggestions?
    Thanks!
    Mvh,
    Øyvind Hermans

    Hello again
    I have stumbled upon a problem with these animations; They crash the browser after viewing them a little while, usually less than 30 seconds in.
    Is this problem also occuring when you watch the animations?
    Is the countdown-code to much for the browsers to handle?
    Thanks in advance for your answers.
    Sincerely,
    Øyvind Hermans

  • Needed help with updating java code

    Hello all,
    Let me begin by let you know I am not a programmer and I have tried to solve this by reading on the net. I am a network admin so I tech knowledge but no programming.
    I have a webcam sending a Jpg to an FTP site and there I have used an applet called view.class to refresh once a second.
    site:http://70.154.170.253/webcamold.html
    My problems is now that it refreshes the same image over and over. It refreshes the cached image not the new image.
    From reading I suspect that it has to do with the newer version of java (it used to work fine).
    I have tried using JavaCam but same issue it just refreshes cached image. Also image flickers, the applet I am trying to fix was really smooth.
    I have also tried to compile code that I found on this forum but I got error dealing with deprecated code.
    Any help would be greatly appreciated!!!
    Code:
    import java.applet.Applet;
    import java.awt.*;
    import java.io.PrintStream;
    public class View extends Applet
    implements Runnable
    public void init()
    setBackground(Color.white);
    String s = getParameter("refresh");
    if(s == null)
    update = 30;
    else
    try
    update = Integer.parseInt(s);
    catch(Exception _ex)
    update = 30;
    filename = getParameter("picture");
    if(filename == null)
    System.out.println("No filename given as parameter.");
    md = new MediaTracker(this);
    off = createImage(size().width, size().height);
    refreshImage();
    public void paint(Graphics g)
    g.drawImage(off, 0, 0, this);
    public void update(Graphics g)
    paint(g);
    public void refreshImage()
    img = getImage(getDocumentBase(), filename);
    md.addImage(img, 0);
    try
    md.waitForID(0);
    catch(Exception exception)
    exception.printStackTrace();
    Graphics g = off.getGraphics();
    g.drawImage(img, 0, 0, this);
    img.flush();
    public void run()
    while(th != null)
    try
    refreshImage();
    repaint();
    Thread.sleep(update * 1000);
    catch(Exception exception)
    System.out.println("Error when thread was supposed to sleep: " + exception.getMessage());
    public void start()
    if(th == null)
    th = new Thread(this);
    try
    th.start();
    return;
    catch(Exception exception)
    System.out.println("Couldn't start thread: " + exception.getMessage());
    return;
    } else
    return;
    public void stop()
    if(th != null)
    th.stop();
    th = null;
    public void destroy()
    stop();
    public View()
    update = 30;
    Thread th;
    String filename;
    int update;
    Image img;
    Image off;
    MediaTracker md;

    This is compile error free code and regarding your issues i don't think am good at this stuff
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.MediaTracker;
    public class View extends Applet implements Runnable {
         Thread th;
         String filename;
         int update;
         Image img;
         Image off;
         MediaTracker md;
         public void init() {
              setBackground(Color.white);
              String s = getParameter("refresh");
              if (s == null) {
                   update = 30;
              } else {
                   try {
                        update = Integer.parseInt(s);
                   } catch (Exception _ex) {
                        update = 30;
              filename = getParameter("picture");
              if (filename == null) {
                   System.out.println("No filename given as parameter.");
              md = new MediaTracker(this);
              off = createImage(size().width, size().height);
              refreshImage();
         public void paint(Graphics g) {
              g.drawImage(off, 0, 0, this);
         public void update(Graphics g) {
              paint(g);
         public void refreshImage() {
              img = getImage(getDocumentBase(), filename);
              md.addImage(img, 0);
              try {
                   md.waitForID(0);
              } catch (Exception exception) {
                   exception.printStackTrace();
              Graphics g = off.getGraphics();
              g.drawImage(img, 0, 0, this);
              img.flush();
         public void run() {
              while (th != null) {
                   try {
                        refreshImage();
                        repaint();
                        Thread.sleep(update * 1000);
                   } catch (Exception exception) {
                        System.out.println("Error when thread was supposed to sleep: "
                                  + exception.getMessage());
         public void start() {
              if (th == null) {
                   th = new Thread(this);
                   try {
                        th.start();
                        return;
                   } catch (Exception exception) {
                        System.out.println("Couldn't start thread: "
                                  + exception.getMessage());
                   return;
              } else {
                   return;
         public void stop() {
              if (th != null) {
                   th.stop();
                   th = null;
         public void destroy() {
              stop();
         public View() {
              update = 30;
    }

  • Flash issue I cant seem to figure out. Please help.

    I cant seem to play embeded videos, youtube, vimeo or even bandcamp. When I go to youtube for an example, the video will take a while to load, along with the "suggested" videos in the right pane. While its loading I am unable to click out of the window or even to another tab. Once the video starts to play there is zero audio. This happens on all sites mentioned above. As of right now the only solution is to restart the computer which to me is an uneccesary solution.
    Ive uninstalled and re-installed Flash 11.7 three or four times now. This will happen randomly too. I was able to use youtube earlier today.
    Im running Windows 7 64, AMD as well as firefox everything is up to date as far as drivers etc. Any help would be awesome.
    Thank you

    This is my procedure
    create or replace
    PACKAGE BODY PKG_UPLOAD_BATCHES AS
    PROCEDURE USP_BATCHES_INSERT(
    BATCH_SEQUENCE_ID IN NUMBER,
    STATUS IN VARCHAR2,
    PACKAGE_SEQUENCE_ID IN NUMBER,
    IS_ACTIVATED IN VARCHAR2,
    MODIFIED_BY NUMBER,
    MODIFIED_DATE IN DATE,
    resultset IN OUT SYS_REFCURSOR) AS
    BEGIN
    /* TODO implementation required */
    --select ICCIDS from (SYS.dbms_debug_vc2coll ICCID_LIST)
    EXECUTE IMMEDIATE
    'BEGIN
    FOR emp IN
    SELECT dbd_iccid
    FROM DEP_ICCID_TEMP
    WHERE commission_pct is not NULL
    LOOP
    BEGIN
    INSERT INTO DEP_BATCH_DETAILS(dbd_iccid,
    dbd_isactivated,
    dbd_modified_by,
    dbd_modified_on,
    dbd_status,
    dbh_seq,
    dpg_seq
    SELECT (emp.dbd_iccid,
    IS_ACTIVATED,
    MODIFIED_BY,
    MODIFIED_DATE,
    STATUS,
    BATCH_SEQUENCE_ID,
    PACKAGE_SEQUENCE_ID
    FROM dual
    WHERE NOT EXISTS (SELECT NULL
    FROM DEP_BATCH_DETAILS
    WHERE DEP_ICCID = emp.dbd_iccid
    END
    END LOOP;
    END; ';
    COMMIT;
    null;
    END USP_BATCHES_INSERT;
    END PKG_UPLOAD_BATCHES;
    Its used to check whether each column in one table(ICCID_TEMP) exists in another table(DEP_BATCH_DETAILS) if not the column data and some other parameters are entered into the 2nd table.
    The procedure compiled fine , I use sql devloper and dont know how to run it from there so i run the procedure from C# code
    Thanks in Advance

  • Need help with a basic script to resize image then resize the canvas

    I am new to photoshop scripting, and have come across a need to force an image to be 8"x10" at 300dpi (whether it is vertical or horizontal)
    I need to maintain the correct orientation in the file, so an Action will not work, I believe I have to implement a script to accomplish this.
    I have the below script so far, but I am not certain of how to input the variables / paramters
    doc = app.activeDocument;
    if (doc.height > doc.width) doc.resizeImage("2400 pixels","3600 pixels", "300", "BICUBIC");
    if (doc.height > doc.width) doc.resizeCanvas("2400 pixels","3000 pixels", "MIDDLECENTER");
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    if (doc.height < doc.width) doc.resizeCanvas(3000,2400,"MIDDLECENTER");
    When I run this script, I get the following error:
    Error 1245: Illegal argument - argument 4
    - Enumerated value expected
    Line: 5
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    The fact that its failing on lien 5 lets nme know that I have the "If" portions of my script correct, I just dont know how to accomplish the functions correctly.
    Any help would be appreciated!
    Thanks,
    Brian

    I know I'm late here but it seems to me your trying to automate a 8"x10 or 10"x8 300DPI  print.
    To do that you must first crop your image to a 4:5 aspect ratio to prevent distortion unless your shooting with a 4" by 5" camera.   I wrote a Plugin script a couple years ago that could help you do a centered crop.  You could do the whole process by recording a simple Photoshop action that uses two  Plugin Scripts only four steps would be needed.
    Step 1 Menu File>Automate>AspectRatioSelection  (My script based of Adobe Fit Image Plugin script) Set 4:5 Aspect ratio, center,  Rectangle, Replace, no feather. Llike Fit Image this script woks on both Landscape and Portrait images. The Selection will be correct for the images orientation.
    Step 2 Menu Image>Crop
    Step 3 Menu File>Automate>Fit Image set 3000 PX height and 3000 PX width the Image will be Resample so its longest side will be 3000 pixels.  Adobe Fit Image Plugin Script always uses BICUBIC resampling.  I have a modified version of Fit Image  that uses Bicubic Sharper whebndownsizing and BicubicSmoother when up sizing.
    Step 4 Menu Image>Size un check resample set resolution to 300 DPI.
    When you play the actions the Script Dialogs will not be displayed and the setting use when you recorded the action will ne used.
    The Plugin Script are included in my crafting actions package:
    http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
    Contains:
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.
    12 Scripts for actions
    My other free Photoshop downloads cam be found here: http://www.mouseprints.net/Photoshop.html

  • Need help with new SoundBlaster ROAR SR20 or it goes to the trash. [Bluetooth]

    Hey Guys, I just recently purchased a the Sound Blaster ROAR SR20 and even after 2 days of owning it and countless searches for help, I've come to no conclusion of why i cant get my laptop to recognize it [Bluetooth] and allow me to download any drivers for it. I have tried Connecting it VIA USB 3.0 whereas the drivers said they were successfully installed [and it works over USB] but when i attempt to re-connect via Bluetooth it shows that 3 separate Bluetooth Peripheral Device Drivers are needed and not installed. I am currently running Windows 7 (64x) Professional and have tried already using this method but with no luck.
    http://support.microsoft.com/kb/2654568
    Attached [hopefully] is a image/screenshot file of the drivers it is showing errors for.
    http://i.imgur.com/6xn9NjV.png
    Hope to hear back from you all soon,
    Will Champion

    Originally Posted by Colin-CL
    Hi Will,
    Please confirm that your laptop supports the following Bluetooth profiles:
    Supported Bluetooth Profile
    - A2DP (Wireless Stereo Bluetooth),
    - AVRCP (Bluetooth Remote Control),
    - HFP (Hands-Free profile)
    If you have access to another Bluetooth speaker, you can try to connect it to see if you are still facing the same issue. What we like to do here is to narrow down where the potential cause of the issue is.
    Another option is to use this bluetooth transmitter with your laptop. Let me know how it goes and I can make further suggestions based on the outcome.
    Cheers,
    Colin-CL
    Ok so i purchased a aptX enabled dongle, installed the drivers from a mini CD, and now when i connect using the CSR 4.0 Bluetooth driver that now shows up on my taskbar, a pop up displays saying that Im now connected to an aptX enabled device.
    Now my problem is that under properties (when selected for playback) i notice that now my advanced settings are drastically...well...crappier. Meaning that the Default Format sampling rate is Locked at 1 Channel, 16 bit, 8000Hz which is telephone quality, and it sounds like telephone quality.
    However when connect using my built in Bluetooth adapter my Default Format sampling rate is 2 Channel, 16 bit, 44100Hz which is CD quality and i have the option only one other selection....2 Channel, 16 bit, 48000Hz which is DVD quality.
    One would think that the so called legendary aptX codec would allow for a higher sample rate so I am wondering if this is user error or perhaps i have an outdated driver (a problem since CSR updates/drivers are no where to be found on the internet)
    Im Hoping that maybe you can help me resolve this issue since Ive hopefully narrow down the list of possible errors
    Hope to hear back from someone soon
    Thanks,
    -Will Champion
    USB Info: Supertech USB Bluetooth 4.0 Low Energy Micro Adapter with CSR8510 controller and CSR Harmony
    http://www.amazon.com/gp/product/B00HQE4MRU/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

  • Need help with iPod Gen2. No Sound will come out

    SO i was playing the ocarina thingy.. when i finished i closed the app and put my iPod into sleep mode.. but about a half hour later.. i picked it up and noticed no sound was emitting...but it would work when I had my ear buds in?? any help would be appreciated

    hi there. you seem to be really smart with ipod touches and i have the same problem this thread started with. only i used to have sound without headphones. i recently updated to 3.1.2 and had no trouble. i synchronized it to my computer to add music and the music went away. was there a new update i wasnt aware of? or did my ipod break? i have the 2nd gen with the rounded silver sides. i cant listen to the sounds from an app unless i have headphones in. wats going on? please email me back at "[email protected]" and thank you.
    ps. i might forgot to check this thred or not be able to find it agian. :/

  • I need help with Apple iCloud verification. I don't have the email and I can't figure out how to get Apple to send me a new one.

    So, in order to back up my music and stuff to the cloud I need to verify my Apple ID and I don't have the verification e-mail. If someone out there could help me out by telling me how to get Apple to send another one, or if they can, I would appreciate it alot. Thank you!!!!!

    Apple ID: Associating and verifying email addresses with your Apple ID

  • One error i cant seem to figure out

    theres one error i can't figure out. its on line 369. i want to set my JTextArea to be blank but the error is:
    cannot find symbol variable NotesList
    i'll post my codes here and will be very grateful if somebody could help me out. thanks .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.text.*;
    import java.util.*;
    import java.util.Vector;
    import javax.swing.JScrollPane.*;
    //import javax.swing.event.ListSelectionListener;
    public class Employment extends JFrame
            //declare class variables
            private JPanel jpApplicant, jpEverything,jpWEST, jpCENTRE, jpEAST, jpAddEditDelete,
                                       jpCentreTOP, jpCentreBOT, jpEastTOP, jpEastCENTRE, jpEastBOT,
                                       jpBlank1, panel1, panel2, panel3, panel4,jpBottomArea,
                                       jpEmptyPanelForDisplayPurposes;
            private JLabel jlblApplicantForm, jlblAppList, jlblName, jlblPhone,
                                       jlblCurrentSalary, jlblPassword, jlblDesiredSalary,
                                       jlblNotes, jlblApplicantSkills, jlblIndustrySkills,
                                       jlblBlank1, jlblBlank2, ApplicantListLabel,
                                       NotesListLabel, ApplicantSkillsLabel,
                                       IndustrySkillsLabel,jlblEmptyLabelForDisplayPurposes;  
            private JButton jbtnAdd1, jbtnEdit, jbtnDelete, jbtnSave, jbtnCancel,
                                            jbtnAdd2, jbtnRemove;
            private JTextField jtfName, jtfPhone, jtfCurrentSalary, jtfPassword,
                                               jtfDesiredSalary;
              private JTabbedPane tabbedPane;
            private DefaultListModel /*listModel,*/listModel2;
              String name,password,phone,currentsalary,desiredsalary,textareastuff,allthetext;
              String selectedname;
            final JTextArea Noteslist= new JTextArea();;
            DefaultListModel listModel = new DefaultListModel();
            JList ApplicantSkillsList = new JList(listModel);
           private ListSelectionModel listSelectionModel;
            JList ApplicantList, /*ApplicantSkillsList,*/ IndustrySkillsList;
            //protected JTextArea NotesList;    
                    //Vector details = new Vector();
                  Vector<StoringData> details = new Vector<StoringData>();             
                public static void main(String []args)
                    Employment f = new Employment();
                    f.setVisible(true);
                    f.setDefaultCloseOperation(EXIT_ON_CLOSE);
                    f.setResizable(false);
                }//end of main
                    public Employment()
                            setSize(800,470);
                            setTitle("E-commerce Placement Agency");
                                  Font listfonts = new Font("TimesRoman", Font.BOLD, 12);
                            JPanel topPanel = new JPanel();
                            topPanel.setLayout( new BorderLayout() );
                            getContentPane().add( topPanel );
                            createPage1();
                            createPage2();
                            createPage3();
                            createPage4();
                            tabbedPane = new JTabbedPane();
                            tabbedPane.addTab( "Applicant", panel1 );
                            tabbedPane.addTab( "Job Order", panel2 );
                            tabbedPane.addTab( "Skill", panel3 );
                            tabbedPane.addTab( "Company", panel4 );
                            topPanel.add( tabbedPane, BorderLayout.CENTER );
            public void createPage1()//PAGE 1
                 /*******************TOP PART********************/
                            panel1 = new JPanel();
                            panel1.setLayout( new BorderLayout());
                                  jpBottomArea = new JPanel();
                                  jpBottomArea.setLayout(new BorderLayout());
                            jpApplicant= new JPanel();
                            jpApplicant.setLayout(new BorderLayout());
                            Font bigFont = new Font("TimesRoman", Font.BOLD,24);
                            jpApplicant.setBackground(Color.lightGray);
                            jlblApplicantForm = new JLabel("\t\t\t\tAPPLICANT FORM  ");
                            jlblApplicantForm.setFont(bigFont);
                            jpApplicant.add(jlblApplicantForm,BorderLayout.EAST);
                            panel1.add(jpApplicant,BorderLayout.NORTH);
                            panel1.add(jpBottomArea,BorderLayout.CENTER);
           /********************************EMPTY PANEL FOR DISPLAY PURPOSES*************************/
                               jpEmptyPanelForDisplayPurposes = new JPanel();
                               jlblEmptyLabelForDisplayPurposes = new JLabel(" ");
                               jpEmptyPanelForDisplayPurposes.add(jlblEmptyLabelForDisplayPurposes);
                               jpBottomArea.add(jpEmptyPanelForDisplayPurposes,BorderLayout.NORTH);
           /*****************************************WEST*********************************/             
                            jpWEST = new JPanel();                 
                            jpWEST.setLayout( new BorderLayout());
                            //Applicant List
                                  listModel2=new DefaultListModel();
                                  ApplicantList = new JList(listModel2);
                                listSelectionModel = ApplicantList.getSelectionModel();
                                listSelectionModel.addListSelectionListener(new SharedListSelectionHandler());
                                JScrollPane scrollPane3 = new JScrollPane(ApplicantList);
                                  ApplicantList.setPreferredSize(new Dimension(20,40));
                                 scrollPane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);                                             
                                scrollPane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                            ApplicantListLabel = new JLabel( "Applicant List:");
                            jpWEST.add(ApplicantListLabel,"North"); 
                            jpWEST.add(scrollPane3,"Center");
                            jpBottomArea.add(jpWEST,BorderLayout.WEST);
                            /*********CENTRE*********/
                            jpCENTRE = new JPanel();
                            jpCENTRE.setLayout(new GridLayout(2,1));
                            jpCentreTOP = new JPanel();
                            jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
                            jpCENTRE.add(jpCentreTOP);
                            jpCentreTOP.setLayout(new GridLayout(6,2));
                              //Creating labels and textfields
                            jlblName = new JLabel( "Name:");
                            jlblBlank1 = new JLabel ("");
                            jtfName = new JTextField(18);
                            jlblBlank2 = new JLabel("");
                            jlblPhone = new JLabel("Phone:");
                            jlblCurrentSalary = new JLabel("Current Salary:");
                            jtfPhone = new JTextField(13);
                            jtfCurrentSalary = new JTextField(7);
                            jlblPassword = new JLabel("Password:");
                            jlblDesiredSalary = new JLabel("Desired Salary:");
                            jtfPassword = new JTextField(13);
                            jtfDesiredSalary = new JTextField(6);
                              //Add labels and textfields to panel
                            jpCentreTOP.add(jlblName);
                            jpCentreTOP.add(jlblBlank1);
                            jpCentreTOP.add(jtfName);
                            jpCentreTOP.add(jlblBlank2);
                            jpCentreTOP.add(jlblPhone);
                            jpCentreTOP.add(jlblCurrentSalary);
                            jpCentreTOP.add(jtfPhone);
                            jpCentreTOP.add(jtfCurrentSalary);
                            jpCentreTOP.add(jlblPassword);
                            jpCentreTOP.add(jlblDesiredSalary);
                            jpCentreTOP.add(jtfPassword);
                            jpCentreTOP.add(jtfDesiredSalary);
                            //Noteslist
                            jpCentreBOT = new JPanel();
                            jpCentreBOT.setLayout( new BorderLayout());
                            jpCENTRE.add(jpCentreBOT);
                            jpBlank1 = new JPanel();
                             //     Noteslist = new JTextArea(/*Document doc*/);
                            JScrollPane scroll3=new JScrollPane(Noteslist);
                                scroll3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);                                             
                                scroll3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                            NotesListLabel = new JLabel( "Notes:");
                            jpCentreBOT.add(NotesListLabel,"North"); 
                            jpCentreBOT.add(scroll3,"Center");
                            jpCentreBOT.add(jpBlank1,"South");
                            jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
                            /**********EAST**********/
                            //Applicant Skills Panel
                            //EAST ==> TOP
                            jpEAST = new JPanel();
                            jpEAST.setLayout( new BorderLayout());
                            jpEastTOP = new JPanel();
                            jpEastTOP.setLayout( new BorderLayout());
                            ApplicantSkillsLabel = new JLabel( "Applicant Skills");
                            JScrollPane scrollPane1 = new JScrollPane(ApplicantSkillsList);
                               scrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);                                             
                              scrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);                                             
                            ApplicantSkillsList.setVisibleRowCount(6);
                            jpEastTOP.add(ApplicantSkillsLabel,"North"); 
                            jpEastTOP.add(scrollPane1,"Center");
                            jpEAST.add(jpEastTOP,BorderLayout.NORTH);
                            jpBottomArea.add(jpEAST,BorderLayout.EAST);
                            //Add & Remove Buttons
                            //EAST ==> CENTRE
                            jpEastCENTRE = new JPanel();
                            jpEAST.add(jpEastCENTRE,BorderLayout.CENTER);
                            jbtnAdd2 = new JButton("Add");
                            jbtnRemove = new JButton("Remove");
                            //add buttons to panel
                            jpEastCENTRE.add(jbtnAdd2);
                            jpEastCENTRE.add(jbtnRemove);
                            //add listener to button
                           jbtnAdd2.addActionListener(new Add2Listener());
                           jbtnRemove.addActionListener(new RemoveListener());
                            //Industry Skills Panel
                            //EAST ==> BOTTOM
                            jpEastBOT = new JPanel();
                            jpEastBOT.setLayout( new BorderLayout());
                           String[] data = {"Access97", "Basic Programming",
                           "C++ Programming", "COBOL Programming",
                           "DB Design", "Fortran programming"};
                           IndustrySkillsList = new JList(data);
                           JScrollPane scrollPane = new JScrollPane(IndustrySkillsList);
                           scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);                                             
                           scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                           IndustrySkillsLabel = new JLabel( "Industry Skills:");
                           jpEastBOT.add(IndustrySkillsLabel,"North"); 
                           jpEastBOT.add(scrollPane,"Center");
                           jpEAST.add(jpEastBOT,BorderLayout.SOUTH);
                            //BOTTOM
                            jpAddEditDelete= new JPanel();
                            jbtnAdd1=       new JButton("Add");
                            jbtnEdit=       new JButton("Edit");
                            jbtnDelete=     new JButton("Delete");
                            jbtnSave=       new JButton("Save");
                            jbtnCancel=     new JButton("Cancel");
                            jpAddEditDelete.add(jbtnAdd1);
                            jpAddEditDelete.add(jbtnEdit);
                            jpAddEditDelete.add(jbtnDelete);
                            jpAddEditDelete.add(jbtnSave);
                            jpAddEditDelete.add(jbtnCancel);
                               jbtnEdit.addActionListener(new EditListener());
                               jbtnDelete.addActionListener(new DeleteListener());
                                jbtnEdit.addActionListener(new EditListener());
                            jbtnAdd1.addActionListener(new Add1Listener());
                            jbtnCancel.addActionListener(new CancelListener());
                            jpBottomArea.add(jpAddEditDelete,BorderLayout.SOUTH);
            public void createPage2()//PAGE 2
                    panel2 = new JPanel();
                    panel2.setLayout( new GridLayout(1,1) );
                    panel2.add( new JLabel( "Sorry,under construction" ) );
            public void createPage3()//PAGE 3
                    panel3 = new JPanel();
                    panel3.setLayout( new GridLayout( 1, 1 ) );
                    panel3.add( new JLabel( "Sorry,under construction" ) );
            public void createPage4()//PAGE 4
                    panel4 = new JPanel();
                    panel4.setLayout( new GridLayout( 1, 1 ) );
                    panel4.add( new JLabel( "Sorry,under construction" ) );
            public class Add1Listener implements ActionListener
            public void actionPerformed(ActionEvent e)
                    name = jtfName.getText();
                    password = jtfPassword.getText();
                    phone = jtfPhone.getText();
                    currentsalary = jtfCurrentSalary.getText();
                    int i= Integer.parseInt(currentsalary);
                    desiredsalary = jtfDesiredSalary.getText();
                    int j= Integer.parseInt(desiredsalary);
                       allthetext = Noteslist.getText();
                       StoringData person = new StoringData(name,password,phone,allthetext,i,j);
                   //     StoringData AppSkillsList = new StoringData(listModel);
                    details.add(person);
                 //     details.add(AppSkillsList);
                  listModel2.addElement(name);
                    jtfName.setText("");
                    jtfPassword.setText("");
                    jtfPhone.setText("");
                    jtfCurrentSalary.setText("");
                    jtfDesiredSalary.setText("");
                    NotesList.setText("");
            public class Add2Listener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                           String temp1;
                           temp1 = (String)IndustrySkillsList.getSelectedValue();
                           listModel.addElement(temp1);
            public class RemoveListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                            int index = ApplicantSkillsList.getSelectedIndex();
                                listModel.remove(index);
            public class EditListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                            jtfName.setEditable(true);
                            jtfPassword.setEditable(true);
                            jtfPhone.setEditable(true);
                            jtfCurrentSalary.setEditable(true);
                            jtfDesiredSalary.setEditable(true);
                            Noteslist.setEditable(true);
                            jbtnAdd2.setEnabled(true);               
                            jbtnRemove.setEnabled(true);
                            jbtnSave.setEnabled(true);
                            jbtnCancel.setEnabled(true);                     
            public class DeleteListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                        int index1 = ApplicantList.getSelectedIndex();
                            listModel2.remove(index1);
            public class SaveListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
            public class CancelListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                    jtfName.setText("");
                    jtfPassword.setText("");
                    jtfPhone.setText("");
                    jtfCurrentSalary.setText("");
                    jtfDesiredSalary.setText("");                         
            public class SharedListSelectionHandler implements ListSelectionListener
            public void valueChanged(ListSelectionEvent e)
             selectedname =ApplicantList.getSelectedValue().toString();
             StoringData selectedPerson = null;
             jtfName.setEditable(false);
             jtfPassword.setEditable(false);
             jtfPhone.setEditable(false);
             jtfCurrentSalary.setEditable(false);
             jtfDesiredSalary.setEditable(false);                                 
             Noteslist.setEditable(false);
             jbtnAdd2.setEnabled(false);               
             jbtnRemove.setEnabled(false);
             jbtnSave.setEnabled(false);
             jbtnCancel.setEnabled(false);
                   for (StoringData person : details)
                          if (person.getName1().equals(selectedname))
                                 selectedPerson = person;
                                 jtfName.setText(person.getName1());
                                 jtfPassword.setText(person.getPassword1());
                              jtfPhone.setText(person.getPhone1());
                              Noteslist.setText(person.getAllTheText1());
                              //String sal1 = Integer.parseString(currentsalary);
                             // String sal2 = Integer.parseString(desiredsalary);
                             // jtfCurrentSalary.setText(sal1);
                             // jtfDesiredSalary.setText(sal2);
                                 break;
                   //     if (selectedPerson != null)
    }

    other file for storage data is:
    //StoringData class
    class StoringData{
    private String name;
    private String password;
    private String phone;
    private String allthetext;
    private int currentsalary;
    private int desiredsalary;
    public StoringData()
      name = null;
      password = null;
      phone = null;
      allthetext = null;
      currentsalary = 0;
      desiredsalary = 0;
    public StoringData(String n,String pw, String p,String a, int c, int d)
      name = n;
      password = pw;
      phone = p;
      currentsalary = c;
      desiredsalary = d;
      allthetext = a;
    public String getName1()
      return name;
    public String getPassword1()
      return password;
    public String getPhone1()
      return phone;
    public String getAllTheText1()
         return allthetext;
    public int getCurrentSalary1()
      return currentsalary;
    public int getdesiredsalary1()
      return desiredsalary;
    }

  • Thimble won't show any details on my "broken" code - I can't figure out the problem.

    I am trying to add a line for the background image. I followed the thimble example and have tried numerous links, all resulting in a red exclamation mark. I'm not sure what the problem is and nothing happens when I click the exclamation mark.
    I also can't save any of my progress because of the error.

    Thanks for trying to help guys!
    I'm totally new at this so as far as I'm aware, I can't actually get a link because it won't save my progress because of the error? So unless its something else causing the error that won't let me save?

Maybe you are looking for

  • XML: SAX vs. DOM vs. jDom etc.

    Is there any reason to use SAX or DOM? I mean is jdom always the best choice? Some information?

  • "Update was terminated" during VF01 after the invoice is save

    I am experiencing an error of "Update was terminated" during VF01 after the invoice is save. The Update terminations are displayed in transaction SM13. When I check the error is in the 'RV_MESSAGE_UPDATE' with the error text 'BF00 075: No entry found

  • I only have PS 6 - can I bundle upgrade to PS 10 & Premiere Elements 10?

    (Mac User) Hi there, I have only PS6 and want to upgrade to PS10. I can see that there is a bundle of PS10 and Premiere Elements 10 so I feel I might as well get that. But will I end up with a PS6 upgraded to 10 and nothing else as I currently have n

  • Paid $3,500+ In charges..???

    Happy Verizon Customer for over 10 years! Upon moving out of Texas...I had to break my contracts because I was moving. Over 3 months paid $3500 in closing accounts, then a year later I recieve a collection notice from afni saying I stil owe Verizon $

  • Speech Control for Windows 8 & 8.1 Wont install because of Global Location

    I am in the U.S.  running a Surface Pro 3 with VS 2015 and cant install the Bing Control because of "some" framework: What framework version does it need? Why am I having this problem>  Please help. Im getting in my log: 2/20/2015 2:35:35 PM - Beginn