How to replace a component in the JPanel?

Hi,
I want to replace a component in the JPanel. My panel has GridBagLayout.
Thanks in advance.

because my application demands me to use GridBagLayout.No it doesn't, that a choice you made. You are never forced to use a specific layout manager. In fact most layout problems are solved by using combinations of layout managers. You two main choices are:
a) use a GridbagLayout for the main panel and then a CardLayout for the two components you want to sway, although it may look strange if the components are a different size as the preferred size of the panel will be the size of the largest component
b) Simulate a card layout using:
panel.remove(...)
panel.add(...);
panel.revalidate(...)

Similar Messages

  • How to add an image to the JPanel

    i have been searching for many to add in an iamge to the JPanel...but with error..can anyone kndly help?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class adv extends JPanel {
    ImageIcon pic = new ImageIcon("home.gif");
    public void paintComponent(Graphics g) {
    g.drawImage(pic,0,0,this);
    super.paintComponent(g);
    public static void main(String[] args) {
    adv mpg= new adv();
    mpg.setLayout(new GridLayout(5,1,15,15));
         JFrame window = new JFrame ("dv");
    window.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);     
    window.add(mpg);
    window.setVisible(true);
    window.setSize (550,225);
    }

    i have try out the suggestion that u have provided...still with error...wat can i do to solve it? any other way?
    below is how i add to my program...
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class adv extends JPanel {
        ImageIcon pic = createImageIcon("home.gif");
        public void paintComponent(Graphics g) {
      super.paintComponent(g);
    g.drawImage(pic.getImage(),0,0,this);
        public static void main(String[] args) {
           /*adv mpg= new adv();
          mpg.setLayout(new GridLayout(5,1,15,15));
             JFrame window = new JFrame ("dv");
             window.setLayout(new BorderLayout());
             frame.add(mpg, BorderLayout.CENTER);
           window.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);     
           window.add(mpg);
           window.setVisible(true);
           window.setSize (550,225);*/
           adv mpg = new adv();
           JFrame frame = new JFrame();
         frame.setLayout(new BorderLayout());
         frame.add(pic, BorderLayout.CENTER);
         frame.setSize(500, 500);
         frame.setVisible(true);
    }

  • How to center a component on the page????

    Hi all
    i want to center a component on the page
    Sorry it may be some thing trivial ???
    but i ve a command button i want to center it on the page ????
    how???

    Hi,
    try this steps:
    1-surround the command button with panelGroupLayout with layout Horizontal.
    2-In panelGroupLayout property select Style tab.
    3-in the Text tab set horizontal Align with Center.
    4-in Box tab set width with 100 Percent
    if panelGroupLayout inside any other component make this palce width 100 percent and its Align Horizontal with Center.
    Sameh Nassar

  • Satellite S3000: how to change a component on the motherboard?

    How do you open the case of this laptop/notebook?
    I need to change a component on the motherboard.
    I get to the stage where all the screws on the base are off, and it seems like all that remains for access into the casing for the 'system board' motherboard is that MAYBE the strip on the front, just below the screen, should be removed.
    Is this so? What do I need to do at this stage?
    It's urgent that I get to do this in the next few hours.

    I dont know what components you want to change on the motherboard but I dont think that its a good idea. :O
    However, I dont think that you will find any officials manual how to do anything on this unit. I think only the service partner can receive such documents.
    I have found in the net this site:
    http://www.irisvista.com/tech/laptops/Toshiba-Satellite-1200/take-apart-laptop-1.htm
    It describes how to open and remove all parts from the Satellite 1200. I know its not a Sat 3000 but you can detect roughly how to do it.
    But you know if you have not experience you shouldnt do or remove anything ;)

  • How to Fit a component in a JPanel

    Hy, I am actually creating a Graphical Programming Language Appln and I am facing some problems.
    My source code is found below. Here is my problem:
    I have inserted some buttons have been inserted in the Main panel until both scroll bar appear,
    what I want is that when I click on the button label "Fit", a new window opens,
    where it shows the buttons which have been fitted in that window, without any scrollbar.How to do that?
    Please send me the code for solving this problem. Its very very urgent.Here are my Code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import javax.swing.tree.*;
    import java.io.*;
    public class MainDesktop extends JFrame implements ActionListener {
    JSplitPane splitPane = new JSplitPane();
    JPanel mainPane = new JPanel();
    JScrollPane mainScrollPane = new JScrollPane();
    Container contentPane = getContentPane();
    public MainDesktop() {
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    //Adding the ToolBar to the main window
    JToolBar toolBar = new JToolBar();
    myToolBar(toolBar);
    contentPane.add(toolBar, BorderLayout.NORTH);
    //create a list of button and add them to a pane
    JButton bgButton = new JButton("Begin");
    JButton rdButton = new JButton("Read");
    JButton wrButton = new JButton("Write");
    JButton efButton = new JButton("If-Else");
    JButton ifButton = new JButton("End-If");
    JButton wlButton = new JButton("While-Loop");
    JButton flButton = new JButton("For-Loop");
    JButton elButton = new JButton("End-Loop");
    JButton swButton = new JButton("Switch");
    JButton arButton = new JButton("Arithmetic");
    JButton enButton = new JButton("End");
    bgButton.setActionCommand("Begin");
    rdButton.setActionCommand("Read");
    wrButton.setActionCommand("Write");
    efButton.setActionCommand("If-Else");
    ifButton.setActionCommand("End-If");
    wlButton.setActionCommand("While-Loop");
    flButton.setActionCommand("For-Loop");
    elButton.setActionCommand("End-Loop");
    swButton.setActionCommand("Switch");
    arButton.setActionCommand("Arithmetic");
    enButton.setActionCommand("End");
    bgButton.addActionListener(this);
    rdButton.addActionListener(this);
    wrButton.addActionListener(this);
    efButton.addActionListener(this);
    ifButton.addActionListener(this);
    wlButton.addActionListener(this);
    flButton.addActionListener(this);
    elButton.addActionListener(this);
    swButton.addActionListener(this);
    arButton.addActionListener(this);
    enButton.addActionListener(this);
    JPanel toolPane = new JPanel();
    toolPane.setLayout(new GridLayout(15,0));
    toolPane.add(bgButton);
    toolPane.add(rdButton);
    toolPane.add(wrButton);
    toolPane.add(efButton);
    toolPane.add(ifButton);
    toolPane.add(wlButton);
    toolPane.add(flButton);
    toolPane.add(elButton);
    toolPane.add(swButton);
    toolPane.add(arButton);
    toolPane.add(enButton);
    //Create a pane for the drawing area and add scroll pane to it
    mainPane.setLayout(new FlowLayout());
    mainScrollPane = new JScrollPane(mainPane);
    mainScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    mainScrollPane.setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    mainScrollPane.setLayout(new ScrollPaneLayout());
    //Create a split pane with the two scroll panes in it
    splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,toolPane, mainScrollPane);
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(100);
    splitPane.setPreferredSize(new Dimension(1000, 650));
    getContentPane().add(splitPane);
    protected void myToolBar(JToolBar toolBar) {
    //Fit button
    JButton fitButton = new JButton("Fit");
    fitButton.setToolTipText("Fit Flowchart to drawing area");
    fitButton.setActionCommand("Fit");
    fitButton.addActionListener(this);
    toolBar.add(fitButton);
    public void actionPerformed(ActionEvent e) {
    String cmd = e.getActionCommand();
    if (cmd.equals("Fit")) {
    //fit flowchart to drawing area
    if (cmd.equals("Delete")) {
    //Delete a node from flowchart
    //Action command for the list of button from the toolbox
    if (cmd.equals("Begin")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("Read")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("Write")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("If-Else")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("End-If")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("While-Loop")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("For-Loop")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("End-Loop")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("Switch")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    if (cmd.equals("Arithmetic")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    //mainPane.repaint();
    if (cmd.equals("End")) {
    dragbutton drag = new dragbutton();
    mainPane.add(drag);
    //mainPane.repaint();
    class dragbutton extends JButton implements DragGestureListener, DragSourceListener {
    public dragbutton() {
    super("Begin");
    DragSource dragSource = DragSource.getDefaultDragSource();
    dragSource.createDefaultDragGestureRecognizer(this,DnDConstants.ACTION_COPY_OR_MOVE,this);
    public void dragGestureRecognized(DragGestureEvent e) {
    e.startDrag(DragSource.DefaultCopyDrop,
    new StringSelection(null),this);
    public void dragDropEnd(DragSourceDropEvent e) {}
    public void dragEnter(DragSourceDragEvent e) {}
    public void dragExit(DragSourceEvent e) {}
    public void dragOver(DragSourceDragEvent e) {}
    public void dropActionChanged(DragSourceDragEvent e) {}
    public static void main(String [] args) {
    MainDesktop mainWindow = new MainDesktop();
    mainWindow.setTitle("Graphical Programming Language");
    mainWindow.setSize(700, 600);
    mainWindow.setVisible(true);

    Instead of using:
    frame.setSize(int, int);
    use:
    frame.pack();

  • JEditorPane: how to replace small parts of the document?

    Hi
    Im trying to create an application that will allow two people to type into two different JEditorPanes, but have the two people essentially editing the same document. So if one person types someting into thier frame, I want that modification sent to the other frame as well.
    The problem I've come across is how to make changes to the contents of the frame without interfering with the person whos trying to type into it. That problem boils down to how do you replace only a small part of the document whithout taking control of the users caret?

    Hopfully I got your problem right. To change only small parts of the EditorPane's document should not be the probelm you can get it with EditorPane.getDocument(). But I think you have to take control over the caret, because the when user 1 has finished editing and sends the doc to user 2 who is editing the doc, user 2's caret position will change because the document length has changed.
    The easiest way would be to add an input area (TextArea) for each user where they can type theit text and than to add the text into the document when they press enter, so you don't have the trouble with te caret position. If you don't want to do this then you could try that: the input of the users is cached while they are typing (not changing the doc) till they press enter. Then the doc is send to the other user, the users doc in the pane is updated and his current typing is added to the end of the new received doc. You can figure out the correct position by doc.getLength() and set the new caret position to doc.length + currentTyping.length
    Hope that helps
    Eryk

  • How to replace a broken component

    Hello,
    Can anybody help me with this issue? For a returned product which needs repairing in Service, we need to be able to replace the broken component with another one, or to be able to add a new component to the product.
    How is this handled in Service? What about Spares Management?
    Do you have any useful documentation?
    Thanks,
    Silviana

    Thank you for your prompt feed-back!
    I have already done the flow you described above. I'm afraid I was not very clear when I exposed our problem.
    We have a serialized finished good, a computer, for instance, which contains 5 serialized components. Using Depot Repair, a RMA was generated and we received the finished good back from the customer. We also were able to issue additional parts using Spares Management. But…the technician notices that a defective component of this finished good (the mother board for instance) must be replaced. The broken mother board has a warranty from the supplier, so the technician needs to receive it in the defective subinventory and then to send it back to the supplier. The technician will replace this component with a usable one. We need to be able to have a RMA for the serialized mother board, not only for the finished good. How can we track this business process using Depot Repair and Spares Management? I did not find any information about replacing a component of the finished good in the Spares Management and Depot Repairs user guides.
    I must mention that in this moment we have Depot Repair configured using Tasks, but in case that this flow works only with WIP, we will configure it as required.
    We also succeeded in replacing a component of a configuration (ATO Item), using OM and tracking this replacement in Install Base. But I read in the documentation that replacing a component using OM does not work for a finished good which is not a configuration. And anyway, it remains our biggest problem: the broken component is not received back in the defective subinventory, it remains at the customer.
    Please help us with this business process.
    Thanks again,
    Silviana

  • How to replace NULL values from main table

    Dear all,
    I like to remove the NULL values from a main table field. Or the question is how to replace any part of the string field in MDM repository main table field.
    e.g.   I have a middle name field partly the value is NULL in some hundreds of records, I like to replace NULL values with Space
    any recommendation.
    Regards,
    Naeem

    Hi Naeem,
    You can try using Workflows for automatically replacing NULLs with any specific value.
    What you can do is: Create a workflow and set trigger action as Record Import, Record Create and Record Update. So, that whenever any change will occur in the repository; that workflow will trigger.
    Now create an assignment expression for replacing NULLs with any specific value and use that assignment expression in your workflow by using Assign Step in workflow.
    For exiting records, you will have to replace NULLs manually using the process given by Preethi else you can export those records in an Excel spreadsheet which have NULLs and then replace all NULLs with any string value and then reimport those records in your MDM repository.
    Hope this will solve your problem.
    Regards,
    Varun
    Edited by: Varun Agarwal on Dec 2, 2008 3:12 PM

  • Replace Logical Component

    I need to complete a mass change of logical componets on my implementation project.  We initially were on ECC 5.0 with a logical componen on ECC.  We have recently upgraded to ECC 6.0 and have a new logical componeont of ECC_EHP.  In the Edit menu, there is an option to replace a logical component.  I can execute the step where I indicate what logical component I want to find and what logical component I want to replace it with, however, when I run it I receive a message:  "Logical Component Replc. Error".  Has anyone successfully got this to work?  Any help?

    I opened a message with SAP, the steps in their response worked:
    Start transaction SOLAR_PROJECT_ADMIN and open the project where
    you would like to replace the log. component.
    Here change to the tab: 'System Landscape' and select the tab 'Systems'
    Here now select the log. component you would like to replace and
    press the button: 'Replace. log component' at the bottom. (the second
    one from left)
    In the following popup select the desired log component.
    (if the one you are looking for is not visible, please press the
    button 'All logical components' and search for the one you would like)
    After you have selected the componet press the OK button.
    At the end you will receive a message that states that the logical
    component has been replaced.

  • Move a component to the back/bottom side of the board? ultiboard

    How can move a component to the back/bottom side of the board, in ultiboard?
    I want to put most of my components on one side of the board, but I want some ribbon cables to come off the back (aka bottom) side of the board.  I would just solder to the other side but that puts every thing in mirror image, and that is bothersome.  
    The board I'm holding here is and example of what I want to build.  
    Solved!
    Go to Solution.

    Hi 
    When you imported your parts in Ultiboard, all parts will be on the top side.
    To put parts on the bottom, just select them (use CTRL to select more parts)
    Then right click on it, and go to properties 
    in that screen, go to the TAB  'position', and there you can chosse the 'board side'
    If you set this in 'bottom' your part will move to the PCB bottom and will be mirrored so the connections are OK.
    You'll see that parts on the bottom hav a different silkscreen color..
    Succes!

  • Hi,I have made a new Apple ID and logged in on my phone, on settings, but the app store is still using my old one. How do I get rid of the old ID and replace it with the new one?

    Hi, I have made a new Apple ID and logged in on my phone, settings > iTunes & app stores, but the app store is still using my old Apple ID. How do I get rid of the old ID and replace it with the new one?

    HAYDONISRAD wrote:
    ...  Maybe I'll stick with hers for now :-)
    OR...
    You could use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?

  • How to replace or remove last 500 bytes of a file without rewriting all the file?

    Hi everyone,
    Usually I only ask for help when I can't find a solution for several days or weeks... And guess what? That just happen!
    So, this is what i am trying to do:
    I have a program to ZIP folder and protect them with password, then it encrypts the zip file.
    That it's working fine, until the user forgets his password.
    So, what I want to do is give the user a Recovery Password option for each ZIP file created. I can't use the Windows Registry because the idea is to be able to recover the password in any computer.So i came up with an idea...
    In simple terms, this will work like this:
    0 - Choose folder to ZIP
    1 - Ask user for recover details (date of birth, email etc)
    2 - ZIP folder with password
    3 - Encrypt ZIP file
    4 - Encrypt recover details and convert it to HEX
    5 - Add recover details (in HEX) to the end of the ZIP file (last bytes)
    6 - Add "5265636F76657244657461696C73" which is the text "RecoverDetails" in HEX
    7 - Add "504B0506000000000000000000000000000000000000" this is the final bytes of a ZIP file and will make the Operating System think that is a ZIP file (i know that will give an error when we try to open it.. the ideia is to change the
    extension later and use my software to do all the work to access this ZIP/folder again)
    So, explaining what it's here, I want to say that I managed how to do all of this so far. The point number 6 will help us to determine where the recover details are in the file, or if they actually exist because user can choose not to use them.
    In order to unlock this ZIP and extract it's contents, I need to reverse what I've done. That means, that  need to read only the last 500 bytes (or less if the file is smaller) of the ZIP and remove those extra bytes I added so the program can check
    if the user is inputing a correct password, and if so decrypt contents and extract them.
    But, if the user insert a wrong password I need to re-add those bytes with the recover details again to the ZIP file.
    The second thing is, if the user forgets his password and asks to recover it, a form will be shown asking to insert the recover detail (date of birth, email etc), so we need to reed the last 500 bytes of the ZIP, find the bytes in number 6 and remove the
    bytes before number 6, remove bytes in number 6 and number 7, and we will have the recover details to match against the user details input.
    I have all done so far with the locking process. But i need help with the unlocking.
    I am not sure if it's possible, but this what i am looking for:
    Read last 500 bytes of a file, remove the bytes with recover details and save the file. Without reading the whole file, because if we have a 1GB file that will take a very long time. Also, i don't want to "waste" hard drive space creating a new
    clone file with 1GB and then delete the original.
    And then add them back "in case user fails the password" which should be exactly the same.
    This sounds a bit confusing I know, even to me, I am writing and trying to explain this the better I can.. Also my English is not the best..
    Here it goes some code to better understanding:
    'READ LAST 500 BYTES OF ZIP FILE TO CHECK IF IT CONTAINS RECOVER DETAILS
    Dim oFileStream As New FileStream(TextBox_ZIP_to_Protect.Text & ".zip", FileMode.Open, FileAccess.Read)
    Dim oBinaryReader As New BinaryReader(oFileStream)
    Dim lBytes As Long = oFileStream.Length
    oBinaryReader.BaseStream.Position = lBytes - 500
    Dim fileData As Byte() = oBinaryReader.ReadBytes(500)
    oBinaryReader.Close()
    oFileStream.Close()
    Dim txtTemp As New System.Text.StringBuilder()
    For Each myByte As Byte In fileData
    txtTemp.Append(myByte.ToString("X2"))
    Next
    Dim RecoveryDetailsPass_Holder = txtTemp.ToString()
    'Dim Temp_2 = txtTemp.ToString()
    'RichTextBox1.Text = txtTemp.ToString()
    If txtTemp.ToString.Contains("505245434F47414653") Then
    'we have password recovery details(the numbers mean RecoverDetails in HEX)
    'next we will get rid of everything before and after of string "cut_at"
    Dim mystr As String = RecoveryDetailsPass_Holder 'RichTextBox1.Text
    Dim cut_at As String = "505245434F47414653"
    Dim x As Integer = InStr(mystr, cut_at)
    ' Dim string_before As String = mystr.Substring(0, x - 1)
    Dim string_after As String = mystr.Substring(x + cut_at.Length - 1)
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace(string_after.ToString, "")
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace("505245434F47414653", "") ' this is RecoverDetails in HEX
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace("504B0506000000000000000000000000000000000000", "") ' this is the bytes of an empty zip file
    'AT THIS POINT WE HAVE ONLY THE RECOVER PASSWORD DETAILS (date of birth, email etc) IN THE VARIABLE "RecoveryDetailsPass_Holder"
    '////////////////////////////////////////////////////// TO DEBUG
    'MsgBox(string_after.ToString & "505245434F47414653")
    'InputBox("", "", string_after.ToString)
    '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ TO DEBUG
    'Temp_2 = Temp_2.Replace(RecoveryDetailsPass_Holder.ToString, "")
    Now that we have the recover details, we need to remove them from ZIP in order to the software try to unzip it with the password provided by the user on the GUI.
    If the user needs to recover the password we have the details already in RecoveryDetailsPass_Holder variable and just need to match them against user input details.
    If the user fails, we need to put the RecoveryDetailsPass_Holder back on the file.
    Any question just ask, it's a bit trick to explain i think, but please ask.
    Anyone know how to do this?
    Many thanks in advanced.
    Nothing is impossible!
    @ Portugal
    Vote if it's helpfull :)

    @ ALL
    Thank you very much for you help. I know that if I'm "playing" with bytes you should assume that I know a lot of VB.net, but I don't know that much unfortunately. I am not a beginner but I am still very fresh and I probably do stuff that work but
    probably not in the best way...
    Anyway, I will explain the idea of this little software I'm making. Once I wanted to create a program to protect folders with password, and I came up with something to change folder permissions to lock access to them, and that actually worked fine and quickly.
    However, I managed how to "crack" the protection by going to folder properties, security tab and then give permissions back to my username. So that, to me, wasn't a safer system to protect folders, also I want the ability to use passwords. So I search
    and search online for a way to do it, and someone replied (to someone with the same question as me) that the best option would be to create a zip with all contents of the folder, with password and then change the extension from .zip to .whatever and register
    the new extension .whatever on the Windows Registry, so that file will have an icon and open with my software.
    So I did...The program zips everything, change the extension and I added the encryption to avoid people changing the extension to ZIP or trying to open with 7-Zip or similar and be able to see the protected files names in the .zip/.whatever
    Answering to all of you now:
    @Armi
    "System.IO.FileStream.SetLength"
    I know I tried that but I erased the code because it didn't work for some reason, I don't remember why sorry, was long time before I created this post.
    The last code I was trying to use was this:
    ' Set the stream position to the desired location of the stream.
    Dim fileStream As IO.FileStream = _
    New IO.FileStream(TextBox_ZIP_to_Protect.Text & ".zip", IO.FileMode.Append)
    Try
    ' Set the stream (OFFSET) position to the desired location of the stream.
    fileStream.Seek(210, IO.SeekOrigin.Current)
    Dim Bytes_do_ZE As Byte() = HexStringToByteArray(Temp_2.ToString)
    'Write Characters ASCII
    For Each Byte_Do_Zeca As Byte In Bytes_do_ZE
    fileStream.WriteByte(Byte_Do_Zeca)
    Next
    Finally
    fileStream.Close()
    End Try
    and we need this:
    Private Shared Function HexStringToByteArray(ByRef strInput As String) As Byte()
    Dim length As Integer
    Dim bOutput As Byte()
    Dim c(1) As Integer
    length = strInput.Length / 2
    ReDim bOutput(length - 1)
    For i As Integer = 0 To (length - 1)
    For j As Integer = 0 To 1
    c(j) = Asc(strInput.Chars(i * 2 + j))
    If ((c(j) >= Asc("0")) And (c(j) <= Asc("9"))) Then
    c(j) = c(j) - Asc("0")
    ElseIf ((c(j) >= Asc("A")) And (c(j) <= Asc("F"))) Then
    c(j) = c(j) - Asc("A") + &HA
    ElseIf ((c(j) >= Asc("a")) And (c(j) <= Asc("f"))) Then
    c(j) = c(j) - Asc("a") + &HA
    End If
    Next j
    bOutput(i) = (c(0) * &H10 + c(1))
    Next i
    Return (bOutput)
    End Function
    That code, as I understand, is to search for the OFFSET of the bytes in the file and start to write from there... That OFFSET should be the beginning of the 500 bytes read on the code before. I got the OFFSET position "210" reading the file with
    the HEX editor "HxD - Hexeditor v1.7.7.0" but using the OFFSET won't work because every file, password, recover details and so on, are different and so the file size, changing the OFFSET I
    think.
    @Reed Kimble
    Does that sound like something which might work for you?
    Thanks for your help. That might be some solution, however it seams a bit of the same problem where we need to read the bytes again to get the recover details. But, as I said in this post, because this is meant to password protect folders, do you think that
    will apply as well?
    @Crazypennie
    Thanks for your reply.
    All this appears really weak. The user has your application since he need it to open the file .... and the code in the application contain the code to read the file without knowing the password. Therefore anyone can read your code and retrieve the
    data without the password ... if he knows VB.
    The application can only open the file if the user didn't use a password to protect the file. Because the file is encrypted and needs to be unencrypted first.
    When the application tries to open/read the file, will need to decrypt it first and then check for a password and do the validation. Also the application is with the code masked/protected which i think it might not be easy for reverse engineering.
    - You need to use a web server and a symmetric key encryption
    This a good idea, besides I don't know how to implement it. However the idea is to be able to:
    1 - Protect a folder anywhere in any Windows computer (portable app)
    2 - Recover password details (security question) in any computer, online and offline
    And I think we need a computer always connected to the Internet to use that method, right?
    @ Mr. Monkeyboy
    Thank you very much for your effort.
    I just wanted to let you know that the zip method you are using is no longer supported.
    I didn't actually knew that. Thanks for letting me know.
    Do you require the compressed encrypted files to actually be Zip files or could they just be compressed files that have nothing to do with Zip?
    No, it doesn't need to be a .zip extension. I am actually using my own extension. It starts as a Zip but then I changed to my own extension which I have registered on the Windows Registry.
    @ ALL
    Thanks again to all for trying and spending time helping me.
    By the way, I might not be able to answer or try any code during the weekend... It's easter break and family is around. Have a nice easter everyone. :)
    Nothing is impossible! Imagination is the limit!

  • My iPad2 Apple logo (the blue box with a capital A) was deleted in error. I would like to know how to replace it or get it back.  Thanks so much . . .

    My iPad2 Apple logo (the blue box with a capital A) was deleted in error. I would like to know how to replace it or get it back.  Thanks so much . . .

    Do you mean the App Store app on your iPad ? If you do then it can't be deleted, but you might have hidden it via Settings > General > Restrictions > Installing Apps 'off' - if that is 'off' then turn it back 'on' and the app should show on one of your iPad's home screens again

  • I pad 2 updated to iOS 6.1.3 and now wifi is greyed out. Apple support engineers say replace but my warranty exited 09/12. Funny how it worked perfectly fine before the update.

    I just updated to6.1.3 and now my wifi button is greyed out. Apple support said it is a hardware issue. Funny how it worked just fine on the previous iOS. Now apple wants me to buy a replace not because my warranty expired 09/12. Seems to me like ios6.1.3 was an update to sell more products. Tried all suggested fixes with no success. With all the noted issues with ios6 there may be another class action lawsuit coming. Apple tech senior advisor unwilling to help. First advisor told me just buy a new I pad. Second advisor wants me to pay for a replacement. Can someone explain to me how an apple approved software upgrade that damaged my i pad is classified as my fault. I've seen some shady selling techniques but this one takes the cake in my book. Anyone have the contact information to higher up executives in apple for me to speak with about my issues?

    Have you check the following?
    Verify that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings
    Ensure that your device is using the latest software.
    If your issue is still unresolved, perform a software restore in iTune

  • HT4889 Replacing System hard drive with a new one. How to get everything over to the new boot drive?

    Replacing System hard drive with a new one. How to get everything over to the new boot drive? Should I use Carbon Copy or does apple have a better untility to do this?
    I can't get my current system drive (OSX 10.8.3) to start on the first try. I always have to shut down and restart again to finally see the Apple logo.
    Have used disc utility to repair the disc and permissions several times and that works. The next time I boot up, it works fine and I get the apple logo, but then the second time I boot up, it's back to the blank screen again and it only boots after the second try.  I have tried this repair three different times now always with the same result. Works right the first try (after the repair) then from the second time on it doesn't work. I just get the white screen until I reboot a second time.
    Thinking I should change drives but what's the easist and best way to move everything over to the new drive so it will boot correctly with all my data on it. This is the system drive for a Pro Tools 10HD setup. MacPro 3,1 with 16 gigs ram and OSX10.8.3 on it.
    Thanks for any help!

    If you have a time machine back up of your current drive you can do this
    Shut down your computer, install the new drive. While the computer is off plug in the external hard drive that you have your time machine back up on. Hold Option key while the computer turnes on, let go of the option key once you get a grey screen. Shortly after you'll see  a list of bootable drives, select the one that has your time machine back up on it and boot into that drive.
    From there go into disk utility, format your new drive too, osx extended journaled ( I think, double check that, its been awhile since ive had to do this), hit format
    Exit disk utility and then you can use time machine to copy all your exisit data to the new hhd and then your pretty much done.
    There is also a program called Carbon Cloner that will do esentially the same thing however I've never uesed it.

Maybe you are looking for