Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

VB.NET to JAVA translation

Sun Apr 10, 2011 4:25 pm

VB.NET Program to Java
Can anyone help me to translate VB.NET code into JAVA code?
I want what the VB.NET program is doing to do the same in JAVA.

Code:
package rxfer;

public class RxFer extends javax.swing.JFrame {

    public RxFer() {
        initComponents();
    }
   
    @SuppressWarnings("unchecked")
    private void initComponents() {

        PanouGrupuri = new javax.swing.JPanel();
        GrupuriScrollPane = new javax.swing.JScrollPane();
        ListaGrupuri = new javax.swing.JList();
        PanouTransmisie = new javax.swing.JPanel();
        TransmisieScrollPane = new javax.swing.JScrollPane();
        ListaTransmisie = new javax.swing.JList();
        PanouReceptionate = new javax.swing.JPanel();
        ReceptionateScrollPane = new javax.swing.JScrollPane();
        ListaReceptionate = new javax.swing.JList();
        BaraProgres = new javax.swing.JProgressBar();
        BaraMeniu = new javax.swing.JMenuBar();
        MeniuUpload = new javax.swing.JMenu();
        ButonUpload1 = new javax.swing.JMenuItem();
        SeparatorUpload = new javax.swing.JPopupMenu.Separator();
        ButonUpload2 = new javax.swing.JMenuItem();
        MeniuDownload = new javax.swing.JMenu();
        ButonDownload1 = new javax.swing.JMenuItem();
        SeparatorDownload = new javax.swing.JPopupMenu.Separator();
        ButonDownload2 = new javax.swing.JMenuItem();
        MeniuIesire = new javax.swing.JMenu();
        ButonIesire = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("JFer");
        setResizable(false);

        PanouGrupuri.setBorder(javax.swing.BorderFactory.createTitledBorder("Grupuri"));
        PanouGrupuri.setPreferredSize(new java.awt.Dimension(200, 557));

        ListaGrupuri.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "A", "B", "C", "D", "K" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        ListaGrupuri.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        GrupuriScrollPane.setViewportView(ListaGrupuri);

        javax.swing.GroupLayout PanouGrupuriLayout = new javax.swing.GroupLayout(PanouGrupuri);
        PanouGrupuri.setLayout(PanouGrupuriLayout);
        PanouGrupuriLayout.setHorizontalGroup(
            PanouGrupuriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(GrupuriScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
        );
        PanouGrupuriLayout.setVerticalGroup(
            PanouGrupuriLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(GrupuriScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
        );

        PanouTransmisie.setBorder(javax.swing.BorderFactory.createTitledBorder("Fi?iere de transmis"));
        PanouTransmisie.setPreferredSize(new java.awt.Dimension(200, 557));

        ListaTransmisie.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        TransmisieScrollPane.setViewportView(ListaTransmisie);

        javax.swing.GroupLayout PanouTransmisieLayout = new javax.swing.GroupLayout(PanouTransmisie);
        PanouTransmisie.setLayout(PanouTransmisieLayout);
        PanouTransmisieLayout.setHorizontalGroup(
            PanouTransmisieLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(TransmisieScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
        );
        PanouTransmisieLayout.setVerticalGroup(
            PanouTransmisieLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(TransmisieScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
        );

        PanouReceptionate.setBorder(javax.swing.BorderFactory.createTitledBorder("Fi?iere recep?ionate"));
        PanouReceptionate.setPreferredSize(new java.awt.Dimension(200, 557));

        ListaReceptionate.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        ListaReceptionate.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        ReceptionateScrollPane.setViewportView(ListaReceptionate);

        javax.swing.GroupLayout PanouReceptionateLayout = new javax.swing.GroupLayout(PanouReceptionate);
        PanouReceptionate.setLayout(PanouReceptionateLayout);
        PanouReceptionateLayout.setHorizontalGroup(
            PanouReceptionateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(ReceptionateScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
        );
        PanouReceptionateLayout.setVerticalGroup(
            PanouReceptionateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(ReceptionateScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
        );

        MeniuUpload.setText("Upload");

        ButonUpload1.setText("Upload 1");
        MeniuUpload.add(ButonUpload1);
        MeniuUpload.add(SeparatorUpload);

        ButonUpload2.setText("Upload 2");
        MeniuUpload.add(ButonUpload2);

        BaraMeniu.add(MeniuUpload);

        MeniuDownload.setText("Download");

        ButonDownload1.setText("Download 1");
        MeniuDownload.add(ButonDownload1);
        MeniuDownload.add(SeparatorDownload);

        ButonDownload2.setText("Download 2");
        MeniuDownload.add(ButonDownload2);

        BaraMeniu.add(MeniuDownload);

        MeniuIesire.setText("Ie?ire");

        ButonIesire.setText("Ie?ire");
        ButonIesire.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButonIesireActionPerformed(evt);
            }
        });
        MeniuIesire.add(ButonIesire);

        BaraMeniu.add(MeniuIesire);

        setJMenuBar(BaraMeniu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(PanouGrupuri, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(PanouTransmisie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(PanouReceptionate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(BaraProgres, javax.swing.GroupLayout.DEFAULT_SIZE, 612, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(PanouReceptionate, javax.swing.GroupLayout.DEFAULT_SIZE, 590, Short.MAX_VALUE)
                    .addComponent(PanouTransmisie, javax.swing.GroupLayout.DEFAULT_SIZE, 590, Short.MAX_VALUE)
                    .addComponent(PanouGrupuri, javax.swing.GroupLayout.DEFAULT_SIZE, 590, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(BaraProgres, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }                       

    private void ButonIesireActionPerformed(java.awt.event.ActionEvent evt) {                                           
System.exit(0);
    }                                           
   
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new RxFer().setVisible(true);
            }
        });
    }

    private javax.swing.JMenuBar BaraMeniu;
    private javax.swing.JProgressBar BaraProgres;
    private javax.swing.JMenuItem ButonDownload1;
    private javax.swing.JMenuItem ButonDownload2;
    private javax.swing.JMenuItem ButonIesire;
    private javax.swing.JMenuItem ButonUpload1;
    private javax.swing.JMenuItem ButonUpload2;
    private javax.swing.JScrollPane GrupuriScrollPane;
    private javax.swing.JList ListaGrupuri;
    private javax.swing.JList ListaReceptionate;
    private javax.swing.JList ListaTransmisie;
    private javax.swing.JMenu MeniuDownload;
    private javax.swing.JMenu MeniuIesire;
    private javax.swing.JMenu MeniuUpload;
    private javax.swing.JPanel PanouGrupuri;
    private javax.swing.JPanel PanouReceptionate;
    private javax.swing.JPanel PanouTransmisie;
    private javax.swing.JScrollPane ReceptionateScrollPane;
    private javax.swing.JPopupMenu.Separator SeparatorDownload;
    private javax.swing.JPopupMenu.Separator SeparatorUpload;
    private javax.swing.JScrollPane TransmisieScrollPane;
}



Attachments
RxFerVBnet.zip
(108.45 KiB) Downloaded 775 times
RxFerJava.zip
(20.05 KiB) Downloaded 691 times

Re: VB.NET to JAVA translation

Sun Apr 10, 2011 9:11 pm

Code:
http://www.tangiblesoftwaresolutions.com/Product_Details/VB_to_Java_Converter_Details.html


Re: VB.NET to JAVA translation

Mon Apr 11, 2011 5:57 am

msi_333 wrote:
Code:
http://www.tangiblesoftwaresolutions.com/Product_Details/VB_to_Java_Converter_Details.html



Either I don't know how to use that converter, either the converter can't translate VB.NET code and I payed allmost 120$ for that.

Re: VB.NET to JAVA translation

Mon Apr 11, 2011 11:54 am

did you tried to contact their customer support . ! actually i didn't tried this tool before ,but i want to help .

Re: VB.NET to JAVA translation

Tue Apr 12, 2011 12:05 pm

Cross-posted on CodeGuru (http://www.codeguru.com/forum/showthread.php?t=510964).

No link facility ??

Re: VB.NET to JAVA translation

Wed Apr 13, 2011 6:31 am

dlorde wrote:Cross-posted on CodeGuru (
Code:
http://www.codeguru.com/forum/showthread.php?t=510964

).

No link facility ??


Yes. That is my post on CodeGuru. I have account there too.

Re: VB.NET to JAVA translation

Wed Apr 13, 2011 4:59 pm

Radu wrote:Yes. That is my post on CodeGuru. I have account there too.


If you're going to cross-post, put links to the other forums where you posted the message, and inform them when you get a result anywhere. Nobody wants to waste their time if the question has been answered elsewhere.

Post a reply
  Related Posts  to : VB.NET to JAVA translation
 search for coding java/jsp for translation text     -  
 Line Translation 2D     -  
 skymiles translation     -  
 2d game in java-Monster-Java 2D Game Graphics and Animation     -  
 what is java     -  
 Using FTP in java     -  
 Java course     -  
 need help in java     -  
 What is Java API?!!!     -  
 java or .net     -