Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kurs_java_alx_20240321
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
kurs_java_alx_20240321
Commits
59dda883
Commit
59dda883
authored
Apr 12, 2024
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kalkulator - wygląd jest
parent
ce5fa66f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
OknoKalkulatora.form
src/swing/kalkulator/OknoKalkulatora.form
+13
-8
OknoKalkulatora.java
src/swing/kalkulator/OknoKalkulatora.java
+16
-5
No files found.
src/swing/kalkulator/OknoKalkulatora.form
View file @
59dda883
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<Form
version=
"1.3"
maxVersion=
"1.9"
type=
"org.netbeans.modules.form.forminfo.JFrameFormInfo"
>
<Form
version=
"1.3"
maxVersion=
"1.9"
type=
"org.netbeans.modules.form.forminfo.JFrameFormInfo"
>
<Properties>
<Properties>
<Property
name=
"defaultCloseOperation"
type=
"int"
value=
"3"
/>
<Property
name=
"defaultCloseOperation"
type=
"int"
value=
"3"
/>
<Property
name=
"title"
type=
"java.lang.String"
value=
"Kalkulator ALX"
/>
</Properties>
</Properties>
<SyntheticProperties>
<SyntheticProperties>
<SyntheticProperty
name=
"formSizePolicy"
type=
"int"
value=
"1"
/>
<SyntheticProperty
name=
"formSizePolicy"
type=
"int"
value=
"1"
/>
...
@@ -67,7 +68,7 @@
...
@@ -67,7 +68,7 @@
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
</Property>
</Property>
<Property
name=
"
text"
type=
"java.lang.String"
value=
"jTextField1
"
/>
<Property
name=
"
horizontalAlignment"
type=
"int"
value=
"4
"
/>
</Properties>
</Properties>
</Component>
</Component>
<Component
class=
"javax.swing.JTextField"
name=
"jTextField2"
>
<Component
class=
"javax.swing.JTextField"
name=
"jTextField2"
>
...
@@ -75,7 +76,7 @@
...
@@ -75,7 +76,7 @@
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
</Property>
</Property>
<Property
name=
"
text"
type=
"java.lang.String"
value=
"jTextField2
"
/>
<Property
name=
"
horizontalAlignment"
type=
"int"
value=
"4
"
/>
</Properties>
</Properties>
</Component>
</Component>
<Component
class=
"javax.swing.JComboBox"
name=
"jComboBox1"
>
<Component
class=
"javax.swing.JComboBox"
name=
"jComboBox1"
>
...
@@ -85,13 +86,16 @@
...
@@ -85,13 +86,16 @@
</Property>
</Property>
<Property
name=
"model"
type=
"javax.swing.ComboBoxModel"
editor=
"org.netbeans.modules.form.editors2.ComboBoxModelEditor"
>
<Property
name=
"model"
type=
"javax.swing.ComboBoxModel"
editor=
"org.netbeans.modules.form.editors2.ComboBoxModelEditor"
>
<StringArray
count=
"4"
>
<StringArray
count=
"4"
>
<StringItem
index=
"0"
value=
"
Item 1
"
/>
<StringItem
index=
"0"
value=
"
+
"
/>
<StringItem
index=
"1"
value=
"
Item 2
"
/>
<StringItem
index=
"1"
value=
"
-
"
/>
<StringItem
index=
"2"
value=
"
Item 3
"
/>
<StringItem
index=
"2"
value=
"
*
"
/>
<StringItem
index=
"3"
value=
"
Item 4
"
/>
<StringItem
index=
"3"
value=
"
/
"
/>
</StringArray>
</StringArray>
</Property>
</Property>
</Properties>
</Properties>
<Events>
<EventHandler
event=
"actionPerformed"
listener=
"java.awt.event.ActionListener"
parameters=
"java.awt.event.ActionEvent"
handler=
"jComboBox1ActionPerformed"
/>
</Events>
<AuxValues>
<AuxValues>
<AuxValue
name=
"JavaCodeGenerator_TypeParameters"
type=
"java.lang.String"
value=
"<String>"
/>
<AuxValue
name=
"JavaCodeGenerator_TypeParameters"
type=
"java.lang.String"
value=
"<String>"
/>
</AuxValues>
</AuxValues>
...
@@ -101,7 +105,7 @@
...
@@ -101,7 +105,7 @@
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
</Property>
</Property>
<Property
name=
"text"
type=
"java.lang.String"
value=
"
jButton1
"
/>
<Property
name=
"text"
type=
"java.lang.String"
value=
"
Oblicz
"
/>
</Properties>
</Properties>
</Component>
</Component>
<Component
class=
"javax.swing.JTextField"
name=
"jTextField3"
>
<Component
class=
"javax.swing.JTextField"
name=
"jTextField3"
>
...
@@ -109,7 +113,8 @@
...
@@ -109,7 +113,8 @@
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Property
name=
"font"
type=
"java.awt.Font"
editor=
"org.netbeans.beaninfo.editors.FontEditor"
>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
<Font
name=
"Arial"
size=
"32"
style=
"0"
/>
</Property>
</Property>
<Property
name=
"text"
type=
"java.lang.String"
value=
"jTextField3"
/>
<Property
name=
"horizontalAlignment"
type=
"int"
value=
"4"
/>
<Property
name=
"text"
type=
"java.lang.String"
value=
"0"
/>
</Properties>
</Properties>
</Component>
</Component>
</SubComponents>
</SubComponents>
...
...
src/swing/kalkulator/OknoKalkulatora.java
View file @
59dda883
...
@@ -25,21 +25,28 @@ public class OknoKalkulatora extends javax.swing.JFrame {
...
@@ -25,21 +25,28 @@ public class OknoKalkulatora extends javax.swing.JFrame {
jTextField3
=
new
javax
.
swing
.
JTextField
();
jTextField3
=
new
javax
.
swing
.
JTextField
();
setDefaultCloseOperation
(
javax
.
swing
.
WindowConstants
.
EXIT_ON_CLOSE
);
setDefaultCloseOperation
(
javax
.
swing
.
WindowConstants
.
EXIT_ON_CLOSE
);
setTitle
(
"Kalkulator ALX"
);
jTextField1
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jTextField1
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jTextField1
.
set
Text
(
"jTextField1"
);
jTextField1
.
set
HorizontalAlignment
(
javax
.
swing
.
JTextField
.
RIGHT
);
jTextField2
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jTextField2
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jTextField2
.
set
Text
(
"jTextField2"
);
jTextField2
.
set
HorizontalAlignment
(
javax
.
swing
.
JTextField
.
RIGHT
);
jComboBox1
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jComboBox1
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jComboBox1
.
setModel
(
new
javax
.
swing
.
DefaultComboBoxModel
<>(
new
String
[]
{
"Item 1"
,
"Item 2"
,
"Item 3"
,
"Item 4"
}));
jComboBox1
.
setModel
(
new
javax
.
swing
.
DefaultComboBoxModel
<>(
new
String
[]
{
"+"
,
"-"
,
"*"
,
"/"
}));
jComboBox1
.
addActionListener
(
new
java
.
awt
.
event
.
ActionListener
()
{
public
void
actionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
jComboBox1ActionPerformed
(
evt
);
}
});
jButton1
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jButton1
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jButton1
.
setText
(
"
jButton1
"
);
jButton1
.
setText
(
"
Oblicz
"
);
jTextField3
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jTextField3
.
setFont
(
new
java
.
awt
.
Font
(
"Arial"
,
0
,
32
));
// NOI18N
jTextField3
.
setText
(
"jTextField3"
);
jTextField3
.
setHorizontalAlignment
(
javax
.
swing
.
JTextField
.
RIGHT
);
jTextField3
.
setText
(
"0"
);
javax
.
swing
.
GroupLayout
layout
=
new
javax
.
swing
.
GroupLayout
(
getContentPane
());
javax
.
swing
.
GroupLayout
layout
=
new
javax
.
swing
.
GroupLayout
(
getContentPane
());
getContentPane
().
setLayout
(
layout
);
getContentPane
().
setLayout
(
layout
);
...
@@ -77,6 +84,10 @@ public class OknoKalkulatora extends javax.swing.JFrame {
...
@@ -77,6 +84,10 @@ public class OknoKalkulatora extends javax.swing.JFrame {
pack
();
pack
();
}
// </editor-fold>//GEN-END:initComponents
}
// </editor-fold>//GEN-END:initComponents
private
void
jComboBox1ActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
//GEN-FIRST:event_jComboBox1ActionPerformed
// TODO add your handling code here:
}
//GEN-LAST:event_jComboBox1ActionPerformed
/**
/**
* @param args the command line arguments
* @param args the command line arguments
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment