Browse Source

geburtstag sauber

new_repo
Hauch IT 6 years ago
parent
commit
a8a83a8b52
  1. 2
      .idea/misc.xml
  2. 179
      .idea/workspace.xml
  3. BIN
      out/production/Alpha/META-INF/Alpha.kotlin_module
  4. BIN
      out/production/Alpha/Main.class
  5. BIN
      out/production/Alpha/geburtstag.class
  6. 199
      src/Geburtstag.java

2
.idea/misc.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

179
.idea/workspace.xml

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="41dc023d-0769-466f-850a-8e3eed9fe5fa" name="Default Changelist" comment="" />
<list default="true" id="41dc023d-0769-466f-850a-8e3eed9fe5fa" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/out/production/Alpha/META-INF/Alpha.kotlin_module" afterDir="false" />
<change afterPath="$PROJECT_DIR$/out/production/Alpha/fenster.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/out/production/Alpha/geburtstag.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -9,9 +14,58 @@
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="DefaultGradleProjectSettings">
<option name="testRunner" value="GRADLE" />
<option name="delegatedBuild" value="true" />
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="277">
<caret line="37" column="31" selection-start-line="37" selection-start-column="31" selection-end-line="37" selection-end-column="31" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Geburtstag.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="18" column="25" lean-forward="true" selection-start-line="18" selection-start-column="25" selection-end-line="18" selection-end-column="25" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#5775#5776#0" expanded="true" />
<element signature="e#5816#5817#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/Main.java" />
<option value="$PROJECT_DIR$/src/testFrame.java" />
<option value="$PROJECT_DIR$/src/fenster.java" />
<option value="$PROJECT_DIR$/src/geburtstag.java" />
<option value="$PROJECT_DIR$/src/Geburtstag.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-8" />
<option name="y" value="-8" />
@ -33,13 +87,7 @@
<path>
<item name="Alpha" type="b2602c69:ProjectViewProjectNode" />
<item name="Alpha" type="462c0819:PsiDirectoryNode" />
<item name=".idea" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Alpha" type="b2602c69:ProjectViewProjectNode" />
<item name="Alpha" type="462c0819:PsiDirectoryNode" />
<item name=".idea" type="462c0819:PsiDirectoryNode" />
<item name="libraries" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
@ -53,6 +101,9 @@
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
@ -66,7 +117,7 @@
</list>
</option>
</component>
<component name="RunManager">
<component name="RunManager" selected="Application.main">
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Main" />
<module name="Alpha" />
@ -74,8 +125,24 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="fenster" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="fenster" />
<module name="Alpha" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="main" />
<module name="Alpha" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.main" />
<item itemvalue="Application.fenster" />
<item itemvalue="Application.Main" />
</list>
</recent_temporary>
@ -91,46 +158,90 @@
<option name="presentableId" value="Default" />
<updated>1562340910388</updated>
<workItem from="1562340912093" duration="26000" />
<workItem from="1562341014848" duration="1785000" />
</task>
<task id="LOCAL-00001" summary="neue master">
<created>1562341097724</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1562341097724</updated>
</task>
<task id="LOCAL-00002" summary="neue master">
<created>1562341184106</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1562341184106</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="26000" />
<option name="totallyTimeSpent" value="1830000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1616" height="886" extended-state="6" />
<layout>
<window_info id="Image Layers" />
<window_info id="Designer" />
<window_info id="UI Designer" />
<window_info id="Capture Tool" />
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25321338" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
<window_info anchor="bottom" id="Database Changes" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Palette" />
<window_info anchor="right" id="Theme Preview" />
<window_info anchor="right" id="Maven" />
<window_info anchor="right" id="Capture Analysis" />
<window_info anchor="right" id="Palette&#9;" />
<window_info anchor="right" id="Database" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
<window_info id="UI Designer" order="4" />
<window_info id="Capture Tool" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Messages" order="0" weight="0.32934928" />
<window_info anchor="bottom" id="Message" order="1" />
<window_info anchor="bottom" id="Find" order="2" />
<window_info anchor="bottom" id="Run" order="3" visible="true" weight="0.32934928" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="7" />
<window_info anchor="bottom" id="Docker" order="8" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Database Changes" order="10" />
<window_info anchor="bottom" id="Terminal" order="11" weight="0.32934928" />
<window_info anchor="bottom" id="Event Log" order="12" side_tool="true" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Theme Preview" order="4" />
<window_info anchor="right" id="Maven" order="5" />
<window_info anchor="right" id="Capture Analysis" order="6" />
<window_info anchor="right" id="Palette&#9;" order="7" />
<window_info anchor="right" id="Database" order="8" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="neue master" />
<option name="LAST_COMMIT_MESSAGE" value="neue master" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/testJFrame.java" />
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="277">
<caret line="37" column="31" selection-start-line="37" selection-start-column="31" selection-end-line="37" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/fenster.java" />
<entry file="file://$PROJECT_DIR$/src/Geburtstag.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="18" column="25" lean-forward="true" selection-start-line="18" selection-start-column="25" selection-end-line="18" selection-end-column="25" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#5775#5776#0" expanded="true" />
<element signature="e#5816#5817#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

BIN
out/production/Alpha/META-INF/Alpha.kotlin_module

BIN
out/production/Alpha/Main.class

BIN
out/production/Alpha/geburtstag.class

199
src/Geburtstag.java

@ -1,199 +0,0 @@
// Java Program to create a text editor using java
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.plaf.metal.*;
import javax.swing.text.*;
class Geburtstag extends JFrame implements ActionListener {
// Text component
JTextArea t;
// Frame
JFrame f;
// Constructor
Geburtstag()
{
// Create a frame
f = new JFrame("editor");
try {
// Set metl look and feel
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
// Set theme to ocean
MetalLookAndFeel.setCurrentTheme(new OceanTheme());
}
catch (Exception e) {
}
// Text component
t = new JTextArea();
// Create a menubar
JMenuBar mb = new JMenuBar();
// Create amenu for menu
JMenu m1 = new JMenu("File");
// Create menu items
JMenuItem mi1 = new JMenuItem("New");
JMenuItem mi2 = new JMenuItem("Open");
JMenuItem mi3 = new JMenuItem("Save");
JMenuItem mi9 = new JMenuItem("Print");
// Add action listener
mi1.addActionListener(this);
mi2.addActionListener(this);
mi3.addActionListener(this);
mi9.addActionListener(this);
m1.add(mi1);
m1.add(mi2);
m1.add(mi3);
m1.add(mi9);
// Create amenu for menu
JMenu m2 = new JMenu("Edit");
// Create menu items
JMenuItem mi4 = new JMenuItem("cut");
JMenuItem mi5 = new JMenuItem("copy");
JMenuItem mi6 = new JMenuItem("paste");
// Add action listener
mi4.addActionListener(this);
mi5.addActionListener(this);
mi6.addActionListener(this);
m2.add(mi4);
m2.add(mi5);
m2.add(mi6);
JMenuItem mc = new JMenuItem("close");
mc.addActionListener(this);
mb.add(m1);
mb.add(m2);
mb.add(mc);
f.setJMenuBar(mb);
f.add(t);
f.setSize(500, 500);
f.show();
}
// If a button is pressed
public void actionPerformed(ActionEvent e)
{
String s = e.getActionCommand();
if (s.equals("cut")) {
t.cut();
}
else if (s.equals("copy")) {
t.copy();
}
else if (s.equals("paste")) {
t.paste();
}
else if (s.equals("Save")) {
// Create an object of JFileChooser class
JFileChooser j = new JFileChooser("f:");
// Invoke the showsSaveDialog function to show the save dialog
int r = j.showSaveDialog(null);
if (r == JFileChooser.APPROVE_OPTION) {
// Set the label to the path of the selected directory
File fi = new File(j.getSelectedFile().getAbsolutePath());
try {
// Create a file writer
FileWriter wr = new FileWriter(fi, false);
// Create buffered writer to write
BufferedWriter w = new BufferedWriter(wr);
// Write
w.write(t.getText());
w.flush();
w.close();
}
catch (Exception evt) {
JOptionPane.showMessageDialog(f, evt.getMessage());
}
}
// If the user cancelled the operation
else
JOptionPane.showMessageDialog(f, "the user cancelled the operation");
}
else if (s.equals("Print")) {
try {
// print the file
t.print();
}
catch (Exception evt) {
JOptionPane.showMessageDialog(f, evt.getMessage());
}
}
else if (s.equals("Open")) {
// Create an object of JFileChooser class
JFileChooser j = new JFileChooser("f:");
// Invoke the showsOpenDialog function to show the save dialog
int r = j.showOpenDialog(null);
// If the user selects a file
if (r == JFileChooser.APPROVE_OPTION) {
// Set the label to the path of the selected directory
File fi = new File(j.getSelectedFile().getAbsolutePath());
try {
// String
String s1 = "", sl = "";
// File reader
FileReader fr = new FileReader(fi);
// Buffered reader
BufferedReader br = new BufferedReader(fr);
// Initilize sl
sl = br.readLine();
// Take the input from the file
while ((s1 = br.readLine()) != null) {
sl = sl + "\n" + s1;
}
// Set the text
t.setText(sl);
}
catch (Exception evt) {
JOptionPane.showMessageDialog(f, evt.getMessage());
}
}
// If the user cancelled the operation
else
JOptionPane.showMessageDialog(f, "the user cancelled the operation");
}
else if (s.equals("New")) {
t.setText("");
}
else if (s.equals("close")) {
f.setVisible(false);
}
}
// Main class
public static void main(String args[])
{
fenster e = new fenster();
}
}
Loading…
Cancel
Save