How to put JScrolPAne in a JText Area

JTextArea TArea=new JTextArea("",20,20);
JScrollPane SPane= new JScrollPane(TArea);
c.add(TArea,0);
how??

You could try something like:
http://www.beginner-java-tutorial.com/java-swing-tutorial.html
but I still think the one Sun has is the best. I did that years ago (1.2) and from there have just kept up with the changes and forums. Swing is complex, from the basic understanding of not blocking the event dispatch thread to understanding gridbaglayouts, you might want to try and find a really good book on swing (I used to have one a few years ago... don't ask me what it was...)

Similar Messages

  • When I put my phone into Do Not Disturb mode....how do I know who my favorites are who can override this feature

    When I put my phone iPhone 4s into Do Not Disturb mode, how do I know who my favorites are that can over ride this feature?

    The sort fields should generally be empty unless you've putting in custom values to sort solo artists by their surnames. You can apply common changes to thousands of tracks at once, just don't apply the wrong change because there is no undo.
    It is a good idea to backup before undertaking large scale changes. See this backup tip for a suggested approach.
    tt2
    Message was edited by: turingtest2

  • Brush tool anchor points are gone does some one now how to put them back?

    Brush tool anchor points are gone does some one now how to put them back?

    Press the H key to hide/show the anchor points. The brush tool needs to be active when you do this.

  • How to put smiley in text area?

    Well, I am developing chat application, and I want to know
    how to put smilies in some sort of text area, either movie clips or
    bitmaps? I know that you can use <img> tag, but picture is
    never in line with the text, it always looks wrong.
    Sorry if that's been answered before, but I couldn't find
    it.

    I too am trying to accomplish this, although for a different
    purpose. Any suggestions would be greatly appreciated.

  • How to drag and drop a file with its Systemfile icon to a Jtext area

    I want to drag and drop a file to a JText area with its system file icon , but the problem is I cant show the file icon.
    Anyone knows this.
    this is my code.
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.dnd.DnDConstants;
    import java.awt.dnd.DropTarget;
    import java.awt.dnd.DropTargetDragEvent;
    import java.awt.dnd.DropTargetDropEvent;
    import java.awt.dnd.DropTargetEvent;
    import java.awt.dnd.DropTargetListener;
    import java.io.File;
    import javax.swing.*;
    import javax.swing.filechooser.FileSystemView;
    public class FileDrag extends JFrame implements DropTargetListener {
    DropTarget dt;
    File file;
    JTextArea ta;
    JLabel lbl;
    Graphics g;
    ImageIcon tmpIcon;
    public FileDrag() {
    super("Drop Test");
    setSize(300, 300);
    getContentPane().add(
    new JLabel("Drop a list from your file chooser here:"),
    BorderLayout.NORTH);
    ta = new JTextArea();
    ta.setBackground(Color.white);
    getContentPane().add(ta);
    dt = new DropTarget(ta, this);
    setVisible(true);
    public void dragEnter(DropTargetDragEvent dtde) {
    System.out.println("Drag Enter");
    public void dragExit(DropTargetEvent dte) {
    System.out.println("Source: " + dte.getSource());
    System.out.println("Drag Exit");
    public void dragOver(DropTargetDragEvent dtde) {
    System.out.println("Drag Over");
    public void dropActionChanged(DropTargetDragEvent dtde) {
    System.out.println("Drop Action Changed");
    public void drop(DropTargetDropEvent dtde) {
    FileSystemView view = FileSystemView.getFileSystemView();
    JLabel testb;
    Icon icon = null;
    Toolkit tk;
    Dimension dim;
    BufferedImage buff = null;
    try {
    Transferable tr = dtde.getTransferable();
    DataFlavor[] flavors = tr.getTransferDataFlavors();
    for (int i = 0; i < flavors.length; i++) {
    System.out.println("Possible flavor: " + flavors.getMimeType());
    if (flavors[i].isFlavorJavaFileListType()) {
    dtde.acceptDrop(DnDConstants.ACTION_COPY);
    ta.setText("Successful file list drop.\n\n");
    java.util.List list = (java.util.List) tr.getTransferData(flavors[i]);
    for (int j = 0; j < list.size(); j++) {
    System.out.println(list.get(j));
    file = (File) list.get(j);
    icon = view.getSystemIcon(file);
    ta.append(list.get(j) + "\n");
    ta.append("\n");
    tk = Toolkit.getDefaultToolkit();
    dim = tk.getBestCursorSize(icon.getIconWidth(), icon.getIconHeight());
    buff = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_ARGB);
    icon.paintIcon(ta, buff.getGraphics(), 10, 10);
    repaint();
    dtde.dropComplete(true);
    return;
    System.out.println("Drop failed: " + dtde);
    dtde.rejectDrop();
    } catch (Exception e) {
    e.printStackTrace();
    dtde.rejectDrop();
    public static void main(String args[]) {
    new FileDrag();

    I want to drag and drop a file to a JText area with its system file icon , but the problem is I cant show the file icon.
    Anyone knows this.
    this is my code.
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.dnd.DnDConstants;
    import java.awt.dnd.DropTarget;
    import java.awt.dnd.DropTargetDragEvent;
    import java.awt.dnd.DropTargetDropEvent;
    import java.awt.dnd.DropTargetEvent;
    import java.awt.dnd.DropTargetListener;
    import java.io.File;
    import javax.swing.*;
    import javax.swing.filechooser.FileSystemView;
    public class FileDrag extends JFrame implements DropTargetListener {
    DropTarget dt;
    File file;
    JTextArea ta;
    JLabel lbl;
    Graphics g;
    ImageIcon tmpIcon;
    public FileDrag() {
    super("Drop Test");
    setSize(300, 300);
    getContentPane().add(
    new JLabel("Drop a list from your file chooser here:"),
    BorderLayout.NORTH);
    ta = new JTextArea();
    ta.setBackground(Color.white);
    getContentPane().add(ta);
    dt = new DropTarget(ta, this);
    setVisible(true);
    public void dragEnter(DropTargetDragEvent dtde) {
    System.out.println("Drag Enter");
    public void dragExit(DropTargetEvent dte) {
    System.out.println("Source: " + dte.getSource());
    System.out.println("Drag Exit");
    public void dragOver(DropTargetDragEvent dtde) {
    System.out.println("Drag Over");
    public void dropActionChanged(DropTargetDragEvent dtde) {
    System.out.println("Drop Action Changed");
    public void drop(DropTargetDropEvent dtde) {
    FileSystemView view = FileSystemView.getFileSystemView();
    JLabel testb;
    Icon icon = null;
    Toolkit tk;
    Dimension dim;
    BufferedImage buff = null;
    try {
    Transferable tr = dtde.getTransferable();
    DataFlavor[] flavors = tr.getTransferDataFlavors();
    for (int i = 0; i < flavors.length; i++) {
    System.out.println("Possible flavor: " + flavors.getMimeType());
    if (flavors[i].isFlavorJavaFileListType()) {
    dtde.acceptDrop(DnDConstants.ACTION_COPY);
    ta.setText("Successful file list drop.\n\n");
    java.util.List list = (java.util.List) tr.getTransferData(flavors[i]);
    for (int j = 0; j < list.size(); j++) {
    System.out.println(list.get(j));
    file = (File) list.get(j);
    icon = view.getSystemIcon(file);
    ta.append(list.get(j) + "\n");
    ta.append("\n");
    tk = Toolkit.getDefaultToolkit();
    dim = tk.getBestCursorSize(icon.getIconWidth(), icon.getIconHeight());
    buff = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_ARGB);
    icon.paintIcon(ta, buff.getGraphics(), 10, 10);
    repaint();
    dtde.dropComplete(true);
    return;
    System.out.println("Drop failed: " + dtde);
    dtde.rejectDrop();
    } catch (Exception e) {
    e.printStackTrace();
    dtde.rejectDrop();
    public static void main(String args[]) {
    new FileDrag();

  • How to put a few pages together as a panel group in the same screen ?

    Dear Friends,
    Hello. I am developing the accounting application of Journal Entry module. I have developed 5 pages for a journal entry: Journal header, Journal Line, Journal total, Journal Error and Journal Approval. I want to put 5 pages together as a panel group in the same screen so that users are convenient to use them. The format is as follows:
    Header | Lines | Total | Error | Approval
    When a user click on Header or Lines or Total or Error or Approval, its related page is displayed below it on the screen. But I don't understand how to put "Header", "Lines", "Total", "Error" and "Approval" together as above format and link them to its related page. Can anybody tell me how to do that ? Thanks.
    Lucy

    Mike,
    It's correct to make 5 pages as a seperate component.
    I am developing an accounting system using PeopleTools by myself.
    Because you understand PeopleSoft financial application, please tell me the 2 questions as follows:
    First, In Journal Line page, when select "edit Journal" and click button "process", the system check the Journal against Budget, if it's Ok, the System assign Journal ID for the Journal and put "valid" into the field of "Budget Status" and "Journal Status" in Total page. If it's not OK, the system send error message into Error page. Do you know how developer do that ?
    Second, In Journal Line Page, when select "Submit Journal" and click button "process", the system send the Journal to Approval page for approval. Do you know how developer do that ?
    Lucy

  • How to put Video/DVD/games/eBook to Nokia

    Nokia phone still the NO.1 of all the phones, As a fan to Nokia phone, I want to share with you some tips to play Nokia. Only some experience of play Nokia phone, just enjoy it.
    This guide will show you how to put videos to Nokia, DVD to Nokia, games to Nokia and eBook to Nokia.
    1 How to convert DVD/Video to Nokia
    2 How to free download games to Nokia
    3 How to put eBook to Nokia
    1 How to convert Video/DVD to Nokia
    After you download [url=http://www.daniusoft.com/dvd-to-nokia-suite.html]Daniusoft DVD to Nokia Suite[/url], you may find there are two options for you to choose for DVD to Nokia or Video to Nokia.
    1 Run “DVD to Nokia Converter” to load Daniusoft DVD to Nokia Converter.
    Insert your DVD disc into your DVD-Rom. Click “Load DVD” button to add the DVD file. You can also click “Load File” to add DVD/IFO from your hard disk.
    [img]http://www.daniusoft.com/article-image/nokia/dvd-nokia.jpg[/img]
    A regular DVD movie has several titles, by default, this software will merge all the DVD chapters into one video clips, you can check the click box before the title list to select any DVD clips you want to rip. Then just check the box “Merge into one file” to join file.
    2 Open the drop download list to choose the Audio and Subtitle you like, you can also change the output files location.
    3 Click on “Start” button to start the conversion.
    Video to Nokia
    Click “Video to Nokia Converter” to load the Daniusoft Video to Nokia Converter.
    The convert video to Nokia is similar with the operation of convert DVD to Nokia
    “Add” button to load video -> Choose output “format” -> “Start” Convert
    This software supports batch conversion, so you can add several video clips at one time.
    Tips:
    Cut off the black edge of DVD- Click on “Effect” button. Move your mouse cursor to a box on the frame around the video to cut off black edge.
    Control file size- You also click on the “Settings” button to customize the resolution, such as: video bit rate, encoder, frame rate, audio bit rate, channel, etc. This program also lets you create a profile and save it, then you can use different settings for each video clips.
    With the “trim” function, you can trim any segment of videos to convert as you want:
    Edit video effect – Click on “Effect” button. You can Adjust Brightness, Contract, Saturation of the video and the adjust the volume of music.
    2 How to download games to Nokia (Free Nokia Java Games Installation guide)
    Step 1 Download one of the Free Nokia Java Game files to your computer, and unzip the contents to a folder called 'Games' on your desktop.
    Step 2. Download and install Nokia PC Suite
    Step 3. Connect your Nokia to your computer with a cable or Bluetooth Dongle or infra-red cable
    Step 4. Launch the Application Installer and continue. (Tutorial is based on the Nokia 7210)
    Click the Install Application Icon Pictured
    Here is a webpage which contains the games and themes list for Nokia, you may find many useful information here:
    http://www.daniusoft.com//nokia-resource-list.html
    How to transfer between Nokia and computer
    Bluetooth - To send a game to your mobile via Bluetooth. You simply right click the desired theme on your desktop, select Send To/Bluetooth/Nokia 6600
    A new message will arrive on your phone, open it and you will be able to install the new game. Once installed, delete the message and press the menu button and your game will have been added.
    infra red connection cable - Firstly you will need an infra red connection cable. Download the SIS file to your computer. Enable infrared port in your phone. Select your sis file on PC, press right mouse button and select "Send to -> Infrared". The file will arrive as new message. Open Messaging application, then open the message. Installer will be started automatically.
    [img]http://www.daniusoft.com/article-image/nokia/game-nokia.jpg[/img]
    Then go to the folder where your files have been downloaded and unzipped into, and select a game folder. For this tutorial we are going to install Blackjack, because we have a gambling problem Double click the Blackjack folder.
    Now you will see the all important Blackjack.jad file double click it to download it to your Nokia 7210
    Wait until the installation process has finished (indicated below). Blackjack is now installed and you can gamble to your hearts content
    3 How to read eBook on Nokia
    1 Download and install the Ebook for Nokia to use as your eBook reader.
    2 Download the Doc or TCR version of an eBook (perhaps Frankenstein).
    3 Transfer the downloaded file to your phone in the standard way.
    Recommended eBooks:
    1 eReader http://www.ereader.com/product/detail/18841?refid=45377
    Formats: eReader, Doc.
    2 MicroReader http://home.c2i.net/thvoslef/midlets/mrinfo.html
    For java-enabled Siemens mobile phones.
    Formats: Doc, TCR, text. Freeware.
    3 ReadM http://my-symbian.com/7650/applications/applications.php?faq=18&fldAuto=347
    Formats: Doc, TCR, and gzipped text files. Freeware.
    4 eBook for Nokia http://www.geocities.com/ebooknokia/
    Formats: Doc, TCR, text, and HTML. Freeware.
    5 iSilo http://www.isilo.com/
    iSilo reads Doc eBooks in addition to its own iSilo format, and it's very easy to convert text, HTML, or DOC files into an iSilo document using free desktop tools.
    Formats: Doc and iSilo.

    Re: Ebooks
    Your explanation for adding ebooks to the phone:
    "3 How to read eBook on Nokia
    1 Download and install the Ebook for Nokia to use as your eBook reader.
    2 Download the Doc or TCR version of an eBook (perhaps Frankenstein).
    3 Transfer the downloaded file to your phone in the standard way."
    Well the only way I know how to put ANYTHING on there is ZOON and ZOON DOES NOT HAVE AN OPTION IN IT FOR EBOOKS THAT I CAN SEE.  
    How is "IN THE STANDARD WAY" supposed to be of any use or help to me whatsoever when STANDARD WAY FOR EBOOKS IS NOT EVIDENT TO ME???

  • . How to put Check box in every row in Table

    Hi Friends,
    I have one doubt in Webdynpro with java. How to put Check box in every row in Table?
    For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in SecondView. So in Second View I will taken Table that data will displayed in rows. I need each and every row first I need check box.
    Here Select Check Box of particular row then click GetData button.  That row data will be displayed in one popup window.
    In table suppose 6 rows available in table. Every Row first Check box available.
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name 
    How to put Check box in every row in Table?  can you send any examples applications
    Regards
    Vijay

    Hi Friend,
    When we are getting BAPI From ECC System. that BAPI Have nodes and Attribues...in under node we can't create "CheckBox"
    attribute.
    So i am doing like this.I am create on Checbox attribue out side of Node. Check Box data type is boolean.
    next i am creating table ( that table having rows and columns) Right click on table-->Click on Insert GroupedColumn->again right click on nsert GroupedColumn---> Here Select Check Box.
    Okay...here i am getting one problem. i have got Check boxes .But i am select check box in  first row. that time all check boxes will be selected.
    i need select first row check box that only first row will be selected suppose i selected second row check box that only second will be selected.
    i need this can u help me....
    Regards
    Vijay

  • How to request FIOS service in my area?

    Hi,
    I just moved to my first home in San Bernardino, CA.  It is a manufactured home in a park, and I was able to get a great deal and pay it off completely.  I was so excited about it, I didn't stop to question the internet service available in the area; afterall, what rock do you have to hide under to not find internet in America in this day and age (or so I thought)?
    To my disbelief, only the units on the outer perimeter can get service!!!!!!  The only thing that is available to me is DSL, and even then it was a HUGE hassle to get it setup because the technicians have to piggyback the lines from a really messed up terminal along the neighbors' backyards!  The speed is so horrible, I just want to cry most nights, and my wife literally has cried on occasion!  I download everything from my cell phone because it's faster, and my cell phone service is anything but fast.  The only other alternative is Dish, and there's a pathetic 30gig limit per month; that wouldn't even last 3 days between my wife, me, and my roommates.
    I don't need TV.  I don't need a phone line.  Hell, I can even live without heating or air conditioning, but the one thing I need is good internet!  I've had to cancel my Hulu and Netflix, completely give up on any form of online gaming, download all my media needs from work or on my cell phone, and overall our entire household is absolutely miserable, to the point that I am considering selling this place to move elsewhere.  Not to mention, for my job I need access to internet from home at all times, this is really screwing up my life!
    We were on 75/35 and already thinking of upgrading to a higher speed plan, so to put that in perspective we are now getting less than 1/1.  I'm not rich, I'm supporting a household of 4 as the only income, but I can afford internet, it's a necessity for me.  I am willing to sign away $150 for a long-term contract, even if it's 5 years, that's $9,000 in revenue; I'm no expert, but I'm pretty sure that would cover the cost of laying down some lines!  Not to mention, there are more than a hundred units in the park, all the potential customers Verizon could have would definitely be to their monetary advantage.  I just can't understand why they don't want to lay down some lines?
    Anyway, I don't have much knowledge about this industry so I'm not sure where to begin to petition for this request.  If needed, I can personally go door-to-door and get committed answers for the need for FIOS in our park, I know for a fact I'm not alone in my frustrations here.  There's not much I won't do in order to get some decent internet!  I hope someone can help point me in the right direction.
    Thank you all for your help!

    I was given the equipment Verizon gave me. A DSL modem. What else do I need? I've certianly had modems in the past provided by other services, but they would at least offer what they promised... which is what... 3-5Mbps? Let me check again...
    Yes, it was "High Speed Internet" in which I was neglected to be mentioned about when I ordered...
    -I checked my speed test, my download speed is 1.95 Mbps, my upload is not even .07 THIS IS EVEN AFTER restarting the modem, you know, turning it off, waiting 1 minute, then plugging it back in.
    -The modem is EXTREMELY hot and it isn't even near any other equipment.
    -I can't even go to TWO pages at a time when they load. Multitasking is near impossible, even when I had AT&T's service at the same speed, it would allow me to go to another page while another loaded or downloaded something. WEBSITES that don't even require even a LITTLE bit amount of bandwidth.
    To further insult, I am getting emails and phone calls from Verizon telling me that my "internet connection speed" is up to code, which is complete and utter **bleep** to put it in short terms. It is a CHORE to go to this website alone to respond.
    I'm fully aware NOW that FiOs is out of the question and requests are impossible.
    Seriously... HOW AM I SUPPOSED TO GET THE SEVICE I REQUESTED?

  • How to put pcitures on iphone

    sorry this might be a very basic question, but i jsut cant figure out how to put a pciture on my photo. just dragging from an outside window into itunes iphone area won't work. i have a jpg and it says this type of media cannot be played on the device. i want to use this picture as a background but jsut cant put it on the device. i think with iphoto i might be able to, but i don't have iphoto, only the default apps that came with mac mini (and for some reason i thoguht i was supposed to get iphoto with ilife but i dont have it).

    with your iphone connected to your computer, select the iphone under "devices". you should see a "photos" tab, and from there, you can designate a folder you want to sync with the phone. probably easiest to creat a new folder, and point to that one. place the photos you want in that folder, and sync!

  • I tried to sinc my photos and i ended up deleting off my phone all the pictures.  i only ended up with one folder, and i cant figure out how to put rest of folders from my computer back on my phone.....help

    i tried to sinc my photos and i ended up deleting off my phone all the pictures.  i only ended up with one folder, and i cant figure out how to put rest of folders from my computer back on my phone.....help
    and on a second problem.  I need to know for sure that my contacts are backed up on my computer

    Create a parent folder on your computer to store the named folders of photos that you want transferred to your iPhone. Under the Photos tab for your iPhone sync preferences with iTunes, select the parent folder. All named folders of photos within will be transferred to your iPhone as separate folders or albums.
    Regarding your 2nd question, this should be easy. Your contacts should be available on your computer with or without an iPhone or any cell phone, which can be lost or stolen.
    Although contacts are included with your iPhone's backup which is updated by iTunes as the first step during the iTunes sync process, not a good idea to depend on this either since the iPhone backup includes a significant amount of other data. Contacts are designed to be synced with a supported address book app on your computer. With Windoze, this can be with Outlook 2003, 2007, or 2010 along with syncing calendar events and notes, or with the address book app used by Outlook Express with XP and by Windows Mail with Vista and Windows 7 called Windows Contacts for syncing contacts only.

  • HT2523 I have text edit and cant seem to get any of my fonts or double spacing onto my screen. I se it for college so it would be nice if i could figure out how to put it on there so its easier to type up a paper

    So i have a mac book air. And i am trying to type a paper but none of the tools are on m document for easy access. I have to go in and try to change everything under the settings manual. I was wondering how i put all of the easy acces tools such as font spacing and styles all on the front part of my screen not up at the top menu area. I just want it where its suppossed to be not hidden. How do i do that? Thanks.

    Thank you so much
    Kiss Kiss Kiss Kiss
    Life saver
    Best wishes and Many thanks
    Samantha

  • I just purchased an Apple TV.  I have a pc running windows 7.  It is connected to a router and the router is connected to a wireless router.  I connect my iPhone, iPad and apple tv to wireless network but do not know how to put the pc on the wifi network

    I just purchased an Apple TV.  I have a pc running windows 7.  It is connected to a router and the router is connected to a wireless router.  I connect my iPhone, iPad and apple tv to wireless network but do not know how to put the pc on the wifi network so the Apple TV can do home share.

    I don't mean to be facetious but sometimes the simplest things are overlooked.  To connect to your library you have to have the computer where the iTunes library is located running and with iTunes open.  It also needs to be on the same network.  My network is dual band and works with either stream but a friend of mine does not.  He has to set the computer and the Apple TV to the same band.  Hope this helps.

  • How to put the file name in notepad file

    dear frank,
    how to put the file name in notepad file via power shell. I mean i want to put the file name in that notepad file
    for example,
    my file name is ABL and in this file data is
    02/06/2015,180.00,182.00,176.01,180.50,1575500
    02/06/2015,4.20,4.20,4.20,4.20,500
    02/06/2015,113.50,113.70,112.91,113.09,157800
    02/06/2015,682.01,695.90,682.00,683.19,4250
    02/06/2015,213.98,215.00,213.00,214.87,326200
    02/06/2015,21.52,21.65,21.52,21.60,4000
    02/06/2015,111.00,111.25,108.25,108.91,17100
    02/06/2015,52.00,52.00,52.00,52.00,500
    and i want to data in this form
    ABL,02/06/2015,180.00,182.00,176.01,180.50,1575500
    ABL,02/06/2015,4.20,4.20,4.20,4.20,500
    ABL,02/06/2015,113.50,113.70,112.91,113.09,157800
    ABL,02/06/2015,682.01,695.90,682.00,683.19,4250
    ABL,02/06/2015,213.98,215.00,213.00,214.87,326200
    ABL,02/06/2015,21.52,21.65,21.52,21.60,4000
    ABL,02/06/2015,111.00,111.25,108.25,108.91,17100
    ABL,02/06/2015,52.00,52.00,52.00,52.00,500
    There are many file like this that i want to be edit
    plese tell me how can i do it, i think it is possible via windows power shell.
    thanks in advance.

    Hi
    Just for completeness, what version of VB.NET are you using?
    Here is a complete project to copy all the files with the added "ABL," at the start of each line.  You need to start a new Project with a BLANK default Form1, and replace all of Form1 code with the code below. When you run this project, you
    need to use the 2 buttons to set up the ORIGINAL file folder and a folder to place the copies. You need to check if the file EXTENSION is correct (I assumed txt), and check the text to add to each line is correct.  Once all is set up you should have a
    big red button to start the operation.
    NOTE: it is important that you try this out on a copy of some of the files to verify accuracy BEFORE trying on original files. Make sure you have a good back up of the original files before doing anything else.
    ' new project with default BLANK Form1
    ' replace all Form1 code with this code
    ' WARNING: make sure you have a backup of
    ' any files you use this application to
    ' operate on.
    Option Strict On
    Option Infer Off
    Option Explicit On
    Public Class Form1
    Dim OrigFileFolderPath As String = Nothing
    Dim CopyToFolderPath As String = Nothing
    Dim lab1, lab2, lab3 As New Label
    Dim tb1, tb2, tb3 As New TextBox
    Dim b1, b2, b3, b4 As New Button
    Dim fb As New FolderBrowserDialog
    Dim bgw As New System.ComponentModel.BackgroundWorker
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
    Me.Size = New Size(731, 300)
    With lab1
    .Text = "Original Files Folder Path"
    .Location = New Point(15, 5)
    End With
    With tb1
    .Width = 560
    .Location = New Point(10, 30)
    .BackColor = Color.Khaki
    .ForeColor = Color.Maroon
    .Font = New Font(Me.Font.FontFamily, 12)
    .BorderStyle = BorderStyle.FixedSingle
    .Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
    End With
    With lab2
    .Text = "Copy Files to Folder Path"
    .Location = New Point(15, 125)
    End With
    With tb2
    .Width = 665
    .Location = New Point(10, 150)
    .BackColor = Color.Khaki
    .ForeColor = Color.Maroon
    .Font = New Font(Me.Font.FontFamily, 12)
    .BorderStyle = BorderStyle.FixedSingle
    .Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
    End With
    With lab3
    .Text = "File Ext"
    .Location = New Point(600, 5)
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    End With
    With tb3
    .Text = ".txt"
    .Width = 80
    .Location = New Point(590, 30)
    .BackColor = Color.Khaki
    .ForeColor = Color.Maroon
    .TextAlign = HorizontalAlignment.Center
    .Font = New Font(Me.Font.FontFamily, 12)
    .BorderStyle = BorderStyle.FixedSingle
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    End With
    With b1
    .Text = "Choose Original Files Folder Path"
    .AutoSize = True
    .Location = New Point(10, 65)
    End With
    With b2
    .Text = "Choose Copy Files to Folder Path"
    .AutoSize = True
    .Location = New Point(10, 185)
    End With
    With b3
    .Text = "DO THE COPY"
    .AutoSize = False
    .Size = New Size(240, 50)
    .BackColor = Color.Red
    .ForeColor = Color.White
    .Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
    .Location = New Point(420, 80)
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    .Visible = False
    End With
    With b4
    .Text = "CANCEL JOB"
    .AutoSize = False
    .Size = New Size(240, 50)
    .BackColor = Color.Red
    .ForeColor = Color.White
    .Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
    .Location = New Point(420, 80)
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    .Visible = False
    End With
    Me.Controls.AddRange({lab1, lab2, lab3, tb1, tb2, tb3, b1, b2, b3, b4})
    With bgw
    .WorkerReportsProgress = True
    .WorkerSupportsCancellation = True
    End With
    AddHandler bgw.DoWork, AddressOf bgw_DoWork
    AddHandler bgw.RunWorkerCompleted, AddressOf bgw_Completed
    AddHandler b1.Click, AddressOf b1_Click
    AddHandler b2.Click, AddressOf b2_Click
    AddHandler b3.Click, AddressOf b3_Click
    AddHandler b4.Click, AddressOf b4_Click
    End Sub
    Private Sub b1_Click(sender As Object, e As EventArgs)
    fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
    fb.ShowNewFolderButton = False
    Dim r As DialogResult = fb.ShowDialog
    If r = Windows.Forms.DialogResult.OK Then
    tb1.Text = fb.SelectedPath
    If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
    If tb3.Text = Nothing Then
    redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
    If tb3.Text = Nothing Then GoTo redo
    End If
    b3.Visible = True
    Else
    b3.Visible = False
    End If
    End If
    End Sub
    Private Sub b2_Click(sender As Object, e As EventArgs)
    fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
    fb.ShowNewFolderButton = True
    Dim r As DialogResult = fb.ShowDialog
    If r = Windows.Forms.DialogResult.OK Then
    tb2.Text = fb.SelectedPath
    If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
    If tb3.Text = Nothing Then
    redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
    If tb3.Text = Nothing Then GoTo redo
    End If
    b3.Visible = True
    Else
    b3.Visible = False
    End If
    End If
    End Sub
    Private Sub b3_Click(sender As Object, e As EventArgs)
    b3.Visible = False
    b4.Visible = True
    If Not tb3.Text.StartsWith(".") Then tb3.Text = "." & tb3.Text
    bgw.RunWorkerAsync()
    End Sub
    Private Sub b4_Click(sender As Object, e As EventArgs)
    bgw.CancelAsync()
    End Sub
    Private Sub ReadPWFile(fn As String)
    Dim filename As String = My.Computer.FileSystem.GetName(fn)
    Dim barename As String = IO.Path.GetFileNameWithoutExtension(fn)
    Dim copyto As String = tb2.Text & "\" & filename
    Dim line As String = Nothing
    Dim lines As New List(Of String)
    Using sr As IO.StreamReader = New IO.StreamReader(fn)
    Do
    line = sr.ReadLine()
    If Not line = Nothing Then
    lines.Add(barename & "," & line)
    End If
    Loop Until line = Nothing
    End Using
    Using sw As IO.StreamWriter = New IO.StreamWriter(copyto)
    For Each s As String In lines
    sw.WriteLine(s)
    Next
    End Using
    End Sub
    Private Sub bgw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
    Dim ftc As Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(tb1.Text)
    For Each f As String In ftc
    If bgw.CancellationPending Then
    e.Cancel = True
    Exit For
    End If
    Dim ex As String = My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower
    If My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower = tb3.Text.ToLower Then
    ReadPWFile(f)
    End If
    Next
    End Sub
    Public Sub bgw_Completed(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
    tb1.Text = Nothing
    tb2.Text = Nothing
    b3.Visible = False
    b4.Visible = False
    MessageBox.Show("Finished copying files", "Job Completed")
    End Sub
    End Class
    Regards Les, Livingston, Scotland

  • How to put the swf in sub directory

    Would you guys let me know how to put the *.swf file which
    has *.flv in sub directory other than root.
    I've tried many things none of them working.
    a regular *.swf are OK. But if that swf file related with
    *.flv. that Swf has to be in root directory on the server.
    if I put that swf in sub directory such as /swf then it's not
    working.
    Please, help me out.

    Hi,
    It looks like this is for the certification, so I won't give you that much helpt. But you could use a modern IDE to do what you want, or use ant (http://ant.apache.org/) for building.
    /Kaj
    Ps. It looks like your classpath is wrong when you try to run the program.

Maybe you are looking for

  • Galleries Tell a friend

    When using Galleries Tell a Friend feature, Is there any way to change who the email is from? When the email arrives from .Mac Web Galleries, My family and friends email app. sorts it out as junk mail. And or they delete it as if it were spam. Thanks

  • Achieving accurate colour prints

    Hi, I am using Ps CS5.1, Canon printer Pixma MP988 & a Mac OS X10.9.1. In the last couple of weeks I no longer am getting correct pri ntouts, I susspect something related to colour profiling has recently changed (I must have done it myself but not aw

  • IR Login Error

    Dear All, I can't login to Integration Repository/Directory after I installed JDK. Following is the error: Root cause: com.sap.engine.services.rmi_p4.P4IOException: Cannot open connection on host: <my XI IP> and port: 50004 I'm not very sure what cau

  • MSS team overview.

    Hello Gurus, When a manager log in to the portal in MSS under team overview he/she will able to view all the employees in his and all the subordinate unit employees. If I want to limit this to only his own organization unit and not any other subordin

  • License error for trial version

    I am getting License error since I have installed the trial version.  I tried by uninstalling and then installing it again, but it did not work. I asked few of my friends who told me that this is an issue with the registry files. I tried by taking a