.:: Jasa Membuat Aplikasi Website,Desktop,Android Order Now..!! | | Order Now..!! Jasa Membuat Project Arduino,Robotic,Print 3D ::.

Setting up an Active Standby Timesten

0 komentar



Active
Standby
Server: 192.168.2.149(vtgptudserver)
Data Store: master1
Installing Directory:/u01/app/TimesTen/tt1121
Port's Daemon: 53396
Port TCP/IP Server TimesTen listen on: 53397

Server: 192.168.2.133 ( PTUDServer3)
Data Store: master2
Installing Directory:/u01/app/TimesTen/tt1122/
Daemon port: 53388
Port TCP/IP Server TimesTen listen on: 53389

1.   Create an Active Master Database
a. Log in to server 1 (vtgptudserver) as the instance administrator and define a DSN for the active master database. In this example we will use a pre-defined DSN master1

Refer to the section Setting up Data Source Name if you need information on how to define your own DSNs.
b. Create and connect to the database master1 using ttIsql:
ttIsql master1
Active (vtgptudserver)
[orattadmin@vtgptudserver info]$ ttisql master1


Copyright (c) 1996-2011, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.

connect "DSN=master1";
Connection successful: DSN=master1;UID=orattadmin;DataStore=/u01/app/TimesTen/tt1122/info/master1;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/u01/app/TimesTen/tt1122/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0;
(Default setting AutoCommit=1)
Command>


If necessary, refer to the section Creating a TimesTen Database for more information.

2.   Create a Database User to Administer the Replication Operations


a. Create a database user and assign it the role of the database and replication administrator. This user is responsible for setting up and managing the active standby pair.

In ttIsql, create an administrator and grant this user admin privilege. In the example, the user adm is the administrator

create user adm identified by adm;
grant admin to adm;
Active (vtgptudserver)
Command> CREATE USER adm IDENTIFIED BY adm;


User created.


Command> GRANT ADMIN TO adm;
b.  Create an application user and tables in the database. In our example, we will create an application user called appuser and this user will own the customers and orders tables.
Create user appuser identified by appuser;
grant create session, create table to appuser;
Active (vtgptudserver)
Command> CREATE USER appuser IDENTIFIED BY appuser;


User created.


Command> GRANT CREATE SESSION, CREATE TABLE TO appuser;

c.   Log in as the user appuser in ttIsql. Execute the following SQL statements, or run the script create_app_user_obj.sql located in the quickstart/sample_scripts/replication/create_appuser_obj.sql�
Active (vtgptudserver)
connect "dsn=master1;uid=appuser";
run "quickstart/sample_scripts/replication/create_appuser_obj.sql"      
create table customers (
cust_number number,
first_name varchar2(12) not null,
last_name varchar2(12) not null,
address varchar2(100) not null,
primary key (cust_number));
insert into customers values (3700,'Peter','Burchard','882 Osborne Avenue, Boston, MA 02122');
insert into customers values (1121,'Saul','Mendoza','721 Stardust Street, Mountain View, CA 94043');
create table orders (
order_number number not null,
cust_number number not null,
prod_number char(10) not null,
order_date date not null,
primary key (order_number),
foreign key (cust_number) references customers (cust_number));
insert into ORDERS values (6853036,3700,'0028616731',to_date('2008-04-05','yyyy-mm-dd'));
insert into ORDERS values (6853041,3700,'0198612710',to_date('2009-01-12','yyyy-mm-dd'));
insert into ORDERS values (6853169,1121,'0003750299',to_date('2008-08-01','yyyy-mm-dd'));
insert into ORDERS values (6853174,1121,'0789428741',to_date('2008-10-25','yyyy-mm-dd'));
insert into ORDERS values (6853179,1121,'0198612583',to_date('2009-02-02','yyyy-mm-dd'));

d. Use the tables command in ttIsql to confirm that the tables has been created.
Active (vtgptudserver)
Command> tables;
  APPUSER.CUSTOMERS
  APPUSER.ORDERS
2 tables found.
Command>
After setting up an initial database, you can now define the configuration of the active standby pair and assign to the current database the active state.
3.   Define the active standby pair
a. In ttIsql, connect to master1 as the replication administrator adm
connect �dsn=master1;uid=adm�;
Active (vtgptudserver)
Command> connect "dsn=master1;uid=adm";
Enter password for 'adm':
Connection successful: DSN=master1;UID=adm;DataStore=/u01/app/TimesTen/tt1122/info/master1;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/u01/app/TimesTen/tt1122/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0;
(Default setting AutoCommit=1)
Command>

b. Define an active standby pair schema by using CREATE ACTIVE STANDBY PAIR statement. The default replication mode for an active standby pair is asynchronous.
 CREATE ACTIVE STANDBY PAIR master1 ON "vtgptudserver", master2 ON "PTUDServer3"
Command> CREATE ACTIVE STANDBY PAIR master1 ON "ptudvtg149", master2 ON "PTUDServer3";




Note: The data store names master1 and master2 used in the CREATE ACTIVE STANDBY statement are not DSNs. They are the filenames defined in the DataStore attribute. The hostnames used in defining the active standby pair should match the values returned by the OS hostname command on the respective servers.

c. The ttIsql command repschemes can be used to verify the current replication scheme deployed in the database.
 repschemes;

Active (vtgptudserver)
Command> repschemes;


Replication Scheme Active Standby:


  Master Store: MASTER1 on vtgptudserver
  Master Store: MASTER2 on PTUDSERVER3




  Excluded Tables:
    None


  Excluded Cache Groups:
    None


  Excluded sequences:
    None


  Store: MASTER1 on vtgptudserver
    Port: (auto)
    Log Fail Threshold: (none)
    Retry Timeout: 120 seconds
    Compress Traffic: Disabled


  Store: MASTER2 on PTUDSERVER3
    Port: (auto)
    Log Fail Threshold: (none)
    Retry Timeout: 120 seconds
    Compress Traffic: Disabled


1 replication scheme found.

Command> ALTER ACTIVE STANDBY PAIR
       >   ALTER STORE master1 on "ptudvtg149"SET PORT 53388 TIMEOUT 180
       >   ALTER STORE master2 on "PTUDServer3" SET PORT 53388 TIMEOUT 180;


4.   Start the replication agent

a.
The replication agent is responsible for replicating data between TimesTen databases. It must be running on both databases in an active standby pair. Use the built-in procedure ttRepStart to start the Replication agent.



call ttrepstart;

5.   Set the replication state to Active


Use the built-in procedure ttRepStateSet to designate the current database (repdb1_1121) the active state in the active standby pair. ttRepStateGet returns the current replication state of the database.



call ttrepstateset ('active');
call ttrepstateget;


Active (vtgptudserver)

Command> call ttrepstart;
Command>
Command> call ttrepstateset ('active');
Command> call ttrepstateget;
< ACTIVE, NO GRID >
1 row found.

After setting up an active master database and defining the active standby pair configuration, you can now create the standby database
6.   Duplicate the active database to the standby

a.
Log in to server 2 (PTUDServer3) as the instance administrator. Use the ttRepAdmin utility to duplicate from the active database to the standby database.



ttrepadmin -duplicate -from master1 -host "ptudvtg149" -uid adm -pwd adm "dsn=master2"



Note that the -from clause is using the data store name master1 and not the DSN name; -uid and -pwd correspond to the username and password of the ADMIN user on the active database.
Standby(PTUDServer3)

[orattadmin@PTUDServer3 info]$ ttrepadmin -duplicate  -remoteDaemonPort 53396 -verbosity 2 -from master1 -host "ptudvtg149" -uid adm -pwd adm "dsn=master2"
14:30:15 Contacting remote main daemon at 192.168.2.149 port 53396
14:30:15 Contacting the replication agent for MASTER1 ON PTUDVTG149 (192.168.2.149) port 53388
14:30:15 Beginning transfer from MASTER1 ON PTUDVTG149 to MASTER2 ON PTUDSERVER3
14:30:22 Checkpoint transfer 10 percent complete
14:30:22 Checkpoint transfer 20 percent complete
14:30:22 Checkpoint transfer 100 percent complete
14:30:22 Checkpoint transfer phase complete
14:30:24 Log transfer 100 percent complete
14:30:24 Log transfer phase complete
14:30:24 Transfer complete
14:30:27 Duplicate Operation Ends


7.   Start the replication agent

a.
Using ttIsql, connect to the database master2 as the replication administrator adm.



ttisql "dsn=master2;uid=adm"


b.
The replication agent on the standby is responsible for processing the data from the active database. Use the built-in procedure ttRepStart to start the replication agent.



call ttrepstart;


c.
Wait for master2 to enter the standby state. Use the built-in procedure ttRepStateGet to verify the current replication state of the database.



call ttrepstateget;
Standby(PTUDServer3)

Command> call ttrepstateget;
< STANDBY, NO GRID >
1 row found.


8.   Verify the data is being replicated between the active and the standby

a.
In ttIsql, connect to master1 as appuser, and insert a record into the orders table.



connect "dsn=master1; uid=appuser";
insert into orders values (6853180,1121,'9999999999', sysdate);


Active (vtgptudserver)



b.
Verify that the insert is replicated to the standby database master2.



select * from appuser.orders where order_number=6853180;


Standby(PTUDServer3)




Reference:


Suni

Beberapa Contoh Elemen Input Text Yang Terbaru Dari HTML5

0 komentar








Pada postingan artikel kali ini ialah tentang beberapa contoh elemen input baru HTML5,�Berikut ini adalah contoh kode pada halaman HTML 5 dengan elemen masukan baru, dengan memiliki visual yang baru dan memiliki set minimum sifat didefinisikan sehingga untuk mendapatkan nuansa bagaimana standar HTML baru yang datang dan lebih fres. Fitur ini juga akan memberi kita sebuah gambaran baru
Suni

Microsoft Visual Basic 2012 Programming for Industrial Applications-Basic Tutorial

0 komentar
The basics of the Visual Studio 2012 for Windows Desktop Integrated Development Environment (IDE) for writing, running and debugging your applications for different platforms.

Visual Studio�s help features
Key commands contained in the IDE�s menus and tool-bar
The purpose of the various kinds of windows in the Visual Studio 2012 for Windows Desktop IDE.How to create, compile and execute a simple Visual Basic app that displays text and an image



Introduction-Visual Studio 2012 is Microsoft�s Integrated Development Environment (IDE) for creating, running and debugging applications (also called apps) written in various .NET programming languages.This Study provides an overview of the Visual Studio 2012 IDE Shows how to create a simple Visual Basic app by dragging and dropping predefined building blocks into place.A technique known as visual app development.
IDE Overview
Once Visual Studio 2012 begins execution, the Start Page displays
The Start Page contains a list of links to Visual Studio resources and web-based resources
At any time, you can return to the Start Page by selecting VIEW > Start Page


The Recent Projects section shows solutions you have been working on
The links in the Get Started tab provide information about the programming languages supported by Visual Studio and various learning resources
An Internet connection is required for the IDE to access most of this information
The IDE also has an internal web browser
Go to VIEW > Other Windows > Web Browser
CONTINUE READING �
Suni

Download Gratis Source Code PHP Sistem Informasi Akademik

0 komentar
Download Gratis Source Code PHP Sistem Informasi Akademik









KLIK Tombol LIKE Facebook Lalu Confirm Untuk Menampilkan Link Download
Click Facebook Like Button Then Confirm To Show Download Link





DOWNLOAD



4shared.com
ziddu.com
ge.tt
tusfiles.net
mediafire.com



Password ZIP :�source-code-gratis.blogspot.com





/* Listen for the pageShared event */
$(document).on('pageShared',
Suni

Download Gratis Source Code PHP E-Accounting

0 komentar
Download Gratis Source Code PHP E-Accounting




















KLIK Tombol LIKE Facebook Lalu Confirm Untuk Menampilkan Link Download
Click Facebook Like Button Then Confirm To Show Download Link







DOWNLOAD



4shared.com
ziddu.com
ge.tt
tusfiles.net
mediafire.com



Password ZIP :�source-code-gratis.blogspot.com





/* Listen for the pageShared event */
$(document).on('pageShared',
Suni

Download Gratis Source Code PHP Sistem Inventori

0 komentar
Download Gratis Source Code PHP Sistem Inventori







KLIK Tombol LIKE Facebook Lalu Confirm Untuk Menampilkan Link Download
Click Facebook Like Button Then Confirm To Show Download Link





DOWNLOAD



4shared.com
ziddu.com
ge.tt
tusfiles.net
mediafire.com



Password ZIP :�source-code-gratis.blogspot.com






/* Listen for the pageShared event */
$(document).on('pageShared',function(e){
Suni

Download Gratis Source Code PHP Web File Uploader

0 komentar
Download Gratis Source Code PHP Web File Uploader


































KLIK Tombol LIKE Facebook Lalu Confirm Untuk Menampilkan Link Download
Click Facebook Like Button Then Confirm To Show Download Link






DOWNLOAD



4shared.com
ziddu.com
ge.tt
tusfiles.net
mediafire.com



Password ZIP :�source-code-gratis.blogspot.com






/* Listen for the pageShared event */
$(document).on(
Suni

Download Gratis Source Code PHP Aplikasi Penjualan Motor (E-Commerce)

0 komentar
Download Gratis Source Code PHP Aplikasi Penjualan Motor (E-Commerce)













KLIK Tombol LIKE Facebook Lalu Confirm Untuk Menampilkan Link Download
Click Facebook Like Button Then Confirm To Show Download Link






DOWNLOAD



4shared.com
ziddu.com
ge.tt
tusfiles.net
mediafire.com



Password ZIP :�source-code-gratis.blogspot.com




/* Listen for the pageShared event */
$(document).on('
Suni

Mengatasi Error Android Studio Failed to Sync Gradle Could Not Reserve Enough Space org.gradle.jvmargs

0 komentar


Mengatasi Error Android Studio Failed to Sync Gradle Could Not Reserve Enough Space or.gradle.jvmargs | Kadang kita mengalami Error ketika membuat project baru di Android Studio, atau membuka Project yang sudah disimpan, error tersebut berbunyi�Failed to Sync Gradle Project..�Could Not Reserve Enough Space For Object Heap, org.gradle.jvmargs=-Xmx1024m. Errornya tampak seperti di bawah ini :


Suni

Example Creating tablespace in Oracle Database.

0 komentar

Create undo tablespace:

create undo tablespace undotbs2 datafile '/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf' size 100M autoextend on next 10M;

Create tablespace:

create tablespace BOC datafile '/u01/app/oracle/oradata/ORCL/datafile/BOC.dbf' size 100M autoextend on next 10M;

Create temporary tablespace:

CREATE TEMPORARY TABLESPACE TEMP1 TEMPFILE '/u01/app/oracle/oradata/ORCL/datafile/temp.dbf' SIZE 2000M;


Suni

Link yang dapat diklik dari String untuk TextView Android

0 komentar




Contoh project dari artikel ini dapat di download�Di sini.
Ada beberapa cara tersembunyi yang dapat kita pakai untuk membuat link url dalam sebuah string bekerja di�AppCompatTextView�pada Android.

Saya menemukan bahwa di custom view (sejujurnya, saya masih mencoba dengan�Material Dialogs), sebuah string dengan url hanya bekerja jika kita menggunakan�setMovementMethod untuk TextView




(adsbygoogle = window.adsbygoogle || [
Suni

JAVA - How To Add A Row To JTable From JTextfields in Java

0 komentar
jtable add row

JAVA - How To Add A Row To JTable Using JTextfields In Java NetBeans

________________________________________________________________________

In This Java Code We Will See How To Insert A Row In JTable From JTextfield  In Java Programming Language.

*Java Courses Java Complete Course

                            Java Swing Course






Source Code:



package java_tutorials;

import javax.swing.table.DefaultTableModel;

/**
 * @author 1bestcsharp.blogspot.com
 */
public class Java_JTable_Add_Row_Using_TextBoxes extends javax.swing.JFrame {

    /**
     * Creates new form Java_JTable_Add_Row_Using_TextBoxes
     */
    public Java_JTable_Add_Row_Using_TextBoxes() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                        
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldID = new javax.swing.JTextField();
        jTextFieldFN = new javax.swing.JTextField();
        jTextFieldLN = new javax.swing.JTextField();
        jTextFieldAGE = new javax.swing.JTextField();
        btnAddRow = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Verdana", 1, 10)); // NOI18N
        jLabel1.setText("Id :");

        jLabel2.setFont(new java.awt.Font("Verdana", 1, 10)); // NOI18N
        jLabel2.setText("First Name :");

        jLabel3.setFont(new java.awt.Font("Verdana", 1, 10)); // NOI18N
        jLabel3.setText("Last Name :");

        jLabel4.setFont(new java.awt.Font("Verdana", 1, 10)); // NOI18N
        jLabel4.setText("Age :");

        btnAddRow.setText("Add Row");
        btnAddRow.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddRowActionPerformed(evt);
            }
        });

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Id", "First Name", "Last Name", "Age"
            }
        ));
        jScrollPane1.setViewportView(jTable1);

        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.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jTextFieldID, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addComponent(jLabel2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jTextFieldFN, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(btnAddRow, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel3)
                                .addComponent(jLabel4))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jTextFieldAGE, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jTextFieldLN, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(29, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldFN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldLN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldAGE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnAddRow, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(21, 21, 21))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(14, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>                      

    // button to add the row to the jtable 
    private void btnAddRowActionPerformed(java.awt.event.ActionEvent evt) {                                          
       // get the model from the jtable
        DefaultTableModel model = (DefaultTableModel)jTable1.getModel();

         // insert row to the model from jtextfields using addRow method
        model.addRow(new Object[]{jTextFieldID.getText(), jTextFieldFN.getText(),
                                  jTextFieldLN.getText(), jTextFieldAGE.getText()});

        
    }                                      

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Java_JTable_Add_Row_Using_TextBoxes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Java_JTable_Add_Row_Using_TextBoxes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Java_JTable_Add_Row_Using_TextBoxes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Java_JTable_Add_Row_Using_TextBoxes.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Java_JTable_Add_Row_Using_TextBoxes().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                  
    private javax.swing.JButton btnAddRow;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField jTextFieldAGE;
    private javax.swing.JTextField jTextFieldFN;
    private javax.swing.JTextField jTextFieldID;
    private javax.swing.JTextField jTextFieldLN;
    // End of variables declaration                
}

      ///////////////////////////////OUTPUT:


Java Add A Row To JTable From JTextfields
 Row Added To JTable From JTextfields




Another Source Code:

package JavaDB_001;
import java.awt.Color;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;


public class Work extends JFrame{
              JTextField JT_fname,JT_lname,JT_age,JT_id;
              JButton btn_add;
              JTable table = new JTable();
              JScrollPane pane;
              Object[] cols = null;
 public Work(){   

     JT_id = new JTextField(20);
     JT_fname = new JTextField(20);
     JT_lname = new JTextField(20);
     JT_age = new JTextField(20);
     JT_id.setBounds(130,20,150,20);
     JT_fname.setBounds(130, 50, 150, 20);
     JT_lname.setBounds(130, 80, 150, 20);
     JT_age.setBounds(130, 110, 150, 20);
     btn_add = new JButton("ADD");
     btn_add.setBounds(300, 80, 100, 20);

       cols = new String[]{"id","fname","lname","age"};

            DefaultTableModel model = (DefaultTableModel) table.getModel();

            model.setColumnIdentifiers(cols);

      //Add A Row To JTable From JTextfields
       btn_add.addActionListener(new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {

              model.addRow(new Object[]{
                               JT_id.getText(),JT_fname.getText(),
                               JT_lname.getText(),JT_age.getText()
                                       });
        }
 });
     
       
       
     pane = new JScrollPane(table);
     pane.setBounds(100,150,300,300);

       
     setLayout(null);
  
     add(pane);
     add(JT_id);
     add(JT_fname);
     add(JT_lname);
     add(JT_age);
     add(btn_add);
     
     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     setVisible(true);
     Color c = Color.decode("#bdb76b");
     getContentPane().setBackground(c);
     setLocationRelativeTo(null);
     setSize(500,500);
    
 }
   public static void main(String[] args){
       new  Work();
   }
}
      ///////////////////////////////OUTPUT:
How To Add A Row To JTable From JTextfields in Java
Row Inserted To JTable From JTextfields
Suni

Tawk.to