FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java-Lab-File-Programs/Q20_Border_Layout.java at main · sagargoswami2001/Java-Lab-File-Programs · GitHub
sagargoswami2001
/
Java-Lab-File-Programs
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
7
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java-Lab-File-Programs
/
Q20_Border_Layout.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (32 loc) · 969 Bytes
Breadcrumbs
Java-Lab-File-Programs
/
Q20_Border_Layout.java
Copy path
File metadata and controls
49 lines (32 loc) · 969 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//Q20. WAP to arrange components using border layout.
package
JAVA_Lab_File
;
import
javax
.
swing
.*;
import
java
.
awt
.
BorderLayout
;
import
java
.
awt
.
Button
;
import
java
.
awt
.
Color
;
public
class
Q20_Border_Layout
{
// Main Method
public
static
void
main
(
String
[]
args
) {
BorderDemo
obj
=
new
BorderDemo
();
}
}
class
BorderDemo
extends
JFrame
{
public
BorderDemo
()
{
setLayout
(
new
BorderLayout
());
setBackground
(
Color
.
red
);
Button
btn1
=
new
Button
(
"Zaphkiel's"
);
Button
btn2
=
new
Button
(
"Kurumi"
);
Button
btn3
=
new
Button
(
"Tokisaki"
);
Button
btn4
=
new
Button
(
"Nightmare"
);
Button
btn5
=
new
Button
(
"Darling"
);
add
(
btn1
,
"North"
);
add
(
btn2
,
"South"
);
add
(
btn3
,
"East"
);
add
(
btn4
,
"West"
);
add
(
btn5
,
"Center"
);
setTitle
(
"Zaphkiel's Border Layout"
);
setSize
(
350
,
300
);
setVisible
(
true
);
}
}
Back
|
FazBrowse Home
|
New Git URL