Introduction to Swing in Java | Free Java Course

Introduction to Swing in Java | Free Java Course

Telusko

9 лет назад

276,838 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@kawaljain2865
@kawaljain2865 - 09.12.2015 20:01

hii sir..
i cant see you video 118. how i see this video please tell me.

Ответить
@rohitthehero1
@rohitthehero1 - 21.11.2016 07:42

very nice series.perfect for beginners..keep it up sir..keep doing more...
P.S.-you saved my sem :P

Ответить
@abhirupparia6439
@abhirupparia6439 - 26.01.2017 09:44

How to get awt complete tutorial?

Ответить
@dhwanishah4093
@dhwanishah4093 - 17.05.2017 14:38

How to use FileChooser in GUI Swing/?

Ответить
@satoshinakamoto171
@satoshinakamoto171 - 18.07.2018 17:15

thanks for the short video for the core concept

Ответить
@parikshit3312
@parikshit3312 - 26.09.2018 12:27

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

Ответить
@juniedelosreyes4275
@juniedelosreyes4275 - 10.10.2019 01:22

Iloveyouu

Ответить
@dennismutemi7991
@dennismutemi7991 - 07.03.2020 12:50

hi sir.........please make a full tutorial on jav programming GUI

Ответить
@isurusandaruwan4769
@isurusandaruwan4769 - 06.05.2020 08:04

Sir..how we make java interfaces responsive 🤔

Ответить
@sonikabudakotijoshi1450
@sonikabudakotijoshi1450 - 02.06.2020 17:29

Please tell me the requirements for running the swing codes

Ответить
@AbhishekSharma-mi5th
@AbhishekSharma-mi5th - 25.06.2020 16:56

Congrts sir for 1M subscriber

Ответить
@AbhishekSharma-mi5th
@AbhishekSharma-mi5th - 25.06.2020 16:57

Hope u will touch 10M mildstone 🤗🤗🤗✌✌🙌👑👑

Ответить
@evangelizadorevangelizador9620
@evangelizadorevangelizador9620 - 24.08.2020 00:15

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

Ответить
@atissshh6636
@atissshh6636 - 05.11.2020 15:45

Big fan

Ответить
@felixkiprop48
@felixkiprop48 - 20.08.2023 11:36

white window CLI window😫

Ответить
@ehanamanath27
@ehanamanath27 - 29.11.2023 16:38

Bro i love your vedio's.I love your teaching technic

Ответить
@nramananful
@nramananful - 04.07.2024 09:18

Mr. Reddy, can you put SpringLayout tutorial video?

Ответить