Total members 11894 |It is currently Mon Nov 25, 2024 5:53 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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 692 times
Author:
Newbie
User avatar Posts: 6
Have thanks: 0 time

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


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

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.


Author:
Newbie
User avatar Posts: 6
Have thanks: 0 time

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

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

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

No link facility ??


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

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.


Author:
Newbie
User avatar Posts: 6
Have thanks: 0 time

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.


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time
Post new topic Reply to topic  [ 7 posts ] 

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









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com