Exemplo n.º 1
0
  public void search_list(View v) {
    /*Intent in=new Intent(this,UserSearch.class);
    startActivityForResult(in,0);
    */

    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction transaction = fragmentManager.beginTransaction();
    UserSearch frag = new UserSearch();
    frag.setUserRoom(this);
    transaction.add(frag, "search");
    transaction.commit();
  }
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    UserSearch = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    jScrollPane3 = new javax.swing.JScrollPane();
    UserTable = new javax.swing.JTable();
    countLabel = new javax.swing.JLabel();

    UserSearch.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            UserSearchKeyTyped(evt);
          }
        });

    jLabel4.setBackground(new java.awt.Color(255, 255, 255));
    jLabel4.setFont(jLabel4.getFont().deriveFont(jLabel4.getFont().getSize() + 1f));
    java.util.ResourceBundle bundle =
        java.util.ResourceBundle.getBundle("aflobby/languages"); // NOI18N
    jLabel4.setText(bundle.getString("CChannelView.jLabel4.text")); // NOI18N

    UserTable.setModel(usertablemodel);
    UserTable.setRowSorter(playertablesorter);
    UserTable.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mousePressed(java.awt.event.MouseEvent evt) {
            UserTableMousePressed(evt);
          }
        });
    jScrollPane3.setViewportView(UserTable);

    countLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    countLabel.setText("players listed");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(
                        jLabel4,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        61,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(36, 36, 36)
                    .addComponent(
                        UserSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE))
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        countLabel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        164,
                        javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(
                jScrollPane3,
                javax.swing.GroupLayout.Alignment.TRAILING,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                483,
                Short.MAX_VALUE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                UserSearch,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(countLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents