Комментарии:
hii sir..
i cant see you video 118. how i see this video please tell me.
very nice series.perfect for beginners..keep it up sir..keep doing more...
P.S.-you saved my sem :P
How to get awt complete tutorial?
ОтветитьHow to use FileChooser in GUI Swing/?
Ответитьthanks for the short video for the core concept
Ответитьimport java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.border.EmptyBorder;
import com.brainmentors.testengine.util.constants.CommonDao;
import com.brainmentors.testengine.util.constants.QueryConstants;
public class SelectTestView1 extends JFrame {
private JPanel contentPane;
private JRadioButton Button;
private String TestName;
private ButtonGroup bg = new ButtonGroup();
JScrollPane scrollPane;
ArrayList<JRadioButton> button;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
SelectTestView1 frame = new SelectTestView1();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public void selectTest() {
ArrayList<String> TestList = new ArrayList<>();
Connection connection = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
connection = CommonDao.getConnection();
pstmt = connection.prepareStatement(QueryConstants.fetchTest);
rs = pstmt.executeQuery();
while (rs.next()) {
TestList.add(rs.getString("testname"));
}
if (TestList.size() > 0) {
connection.commit();
} else {
connection.close();
}
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
try {
connection.rollback();
} catch (SQLException e) {
e.printStackTrace();
}
} catch (SQLException e1) {
e1.printStackTrace();
}
int x = 30;
for (int i = 0; i < TestList.size(); i++) {
Button = new JRadioButton(TestList.get(i));
button = new ArrayList<>();
button.add(Button);
Button.setFont(new Font("Times New Roman", Font.BOLD, 15));
System.out.println("button loop");
Button.setBounds(60, x, 90, 90);
x += i * 10;
bg.add(Button);
contentPane.add(Button);
}
}
public void fetchTest() {
for (int i = 0; i < button.size(); i++) {
if (button.get(i).isSelected()) {
TestName = button.get(i).getText().trim();
TakeTestView taketest = new TakeTestView(TestName);
taketest.setVisible(true);
taketest.setExtendedState(JFrame.MAXIMIZED_BOTH);
System.out.println(" the test name in fetch test loop " + TestName);
System.out.println("The fetch test loop");
} else {
JOptionPane.showMessageDialog(Button, "select one button ");
}
}
System.out.println("Outside fetch test loop ");
this.dispose();
System.out.println("Testname sent from select test " + TestName);
}
/**
* Create the frame.
*/
public SelectTestView1() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 1000, 600);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
scrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setBounds(21, 29, 939, 431);
contentPane.add(scrollPane);
JButton Submit = new JButton("Submit ");
Submit.setFont(new Font("Times New Roman", Font.BOLD, 15));
Submit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
fetchTest();
// System.out.println(TestName);
}
});
Submit.setBounds(756, 496, 140, 38);
contentPane.add(Submit);
selectTest();
bg.clearSelection();
}
}
i am not able to select or click my radio button please help
Iloveyouu
Ответитьhi sir.........please make a full tutorial on jav programming GUI
ОтветитьSir..how we make java interfaces responsive 🤔
ОтветитьPlease tell me the requirements for running the swing codes
ОтветитьCongrts sir for 1M subscriber
ОтветитьHope u will touch 10M mildstone 🤗🤗🤗✌✌🙌👑👑
ОтветитьRepent ye. And you will have peaceful life. Romans 6, 23: For the wages of sin is death; but the gift of God is eternal life through Jesus Christ our Lord.
Jesus Christ loves you. John 3, 16: For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
Mark 1, 15: And saying, The time is fulfilled, and the kingdom of God is at hand: repent ye, and believe the gospel.
Matthew 11, 28 : Come unto me, all ye that labour and are heavy laden, and I will give you rest.
Read Revelation 18
Read Ephesians 6
Gather yourselves together, yea, gather together, O nation not desired;
Before the decree bring forth, before the day pass as the chaff, before the fierce anger of the LORD come upon you, before the day of the LORD'S anger come upon you.
Seek ye the LORD, all ye meek of the earth, which have wrought his judgment; seek righteousness, seek meekness: it may be ye shall be hid in the day of the LORD'S anger.Zephaniah 2,1-3
Big fan
Ответитьwhite window CLI window😫
ОтветитьBro i love your vedio's.I love your teaching technic
ОтветитьMr. Reddy, can you put SpringLayout tutorial video?
Ответить