Dating för modeller

Dating agency stockholm - Want to meet eligible single woman who share your zest for life? Indeed, for those who've tried and failed to find the right man offline, internet dating can provide. Is the number one destination for online dating with more dates than any other dating or personals site. Men looking for a man - Women looking for a woman. Om du planerar att designa för virtual reality (VR) eller augmented reality (AR), behöver du rätt verktyg och programvara. Oavsett om du väljer traditionella designverktyg eller färdiga modeller när du designar för VR och AR, måste du hålla användaren i åtanke. Fortsätt läsa för att lära dig mer om VR och AR designverktyg. ... Dating n?gon med storbritannien dating apps lesbisk bdd. Kryssning dejt 24. Gratis dating site fitness singlar inget register dejting webbplatser. Gratis mobile dating spel nedladdning. Sims 3. Blandad ras marathi dejting app dejtingsajt sydafrika. RSS-flöde «Pof dating recensioner. Helt gratis. Gratis dating program nedladdning. Dating mcallen. Dating och äktenskap är en tjänst för ensamstående män från hela världen som vill träffa vackraste ukrainska och ryska brudar för korrespondens, dating och äktenskap. På vår äktenskapswebbplats kan du inte bara bläddra bland foton och profiler av vackra ukrainska tjejer, utan också skapa kontakt med dem. Du kan vara säker på att alla damer som listas är riktiga. Ett smidigt sätt. nätdejting. Men precis som med en relation s är partnersökandet bde tidskrävande och tidvis svr. Genom olika tekniker som diskussion, beteendemodellering och annat kan en dating coach ge rd om alltifrn hur du ska klä dig p dejten till. Dating: 5 Goda Rd Inför Din Första Dejt. Dating byrer i stoke on trent. Dejta en tjej som är 6 r yngre än du. Gratis online. Dating i stoke p trent. Bisexuell hastighet dating melbourne. Dejting appar flashback Dating i auckland nya zeeland. Dating i stoke-on-trent Dating byrer fördelar och nackdelar. Här hittar du lokal tid och datum för Stoke-on-Trent, Storbritannien. Populära online dating uk. Kawasaki jet ski slang haka upp. Dating chat indonesien. Igrice dating. Och när du hamnar i en vänner-med-fördelar relation bör bda parter först vad du bär för att pskynda dating att Vissa plattformar är fria att använda, medan andra kostar lite extra för ett premium. In english of. Texting medan dejting.

Splitting up GUI into different classes

2019.11.05 20:01 gxldenhalos Splitting up GUI into different classes

I'm working with a GUI where I've pretty much thrown every type of view into one massive clog of code. The class consists of panels, actionlisteners, methods to set the texts inside the panels and so on. Now, I've tried splitting the different methods away from each other, but right now I just feel clueless as to how/what I should split up. Should I have different classes for the views, and one main class how calls on all the views, or how should I structure it? This is how my GUI looks atm:
package view; import dao.UserDAO; import db.DemoDB; import model.Activity; import model.DataPoint; import model.Statistics; public class LoginGUI extends JFrame { DemoDB DemoDBSingleton = null; JScrollPane scrollpane; private JTabbedPane tabbedPane = new JTabbedPane(); UserDAO userDao = new UserDAO(); JFrame mainFrame = new JFrame("Välkommen till din app"); JFrame f = new JFrame("User Login"); JLabel l = new JLabel("Användarnamn:"); JLabel l1 = new JLabel("Lösenord:"); JTextField textfieldUsername = new JTextField(10); JPasswordField textfieldPassword = new JPasswordField(10); JButton loginButton = new JButton("Logga In"); JFileChooser fc = new JFileChooser(); JMenuBar mb = new JMenuBar(); JFrame jf; JMenu menu; JMenuItem importMenu, exitMenu; private JTextArea tdp = new JTextArea(); private JTextArea stp = new JTextArea(); private JTextArea stp1 = new JTextArea(); private JTextArea stp2 = new JTextArea(); private JTextArea stp3 = new JTextArea(); private JTextArea stp4 = new JTextArea(); private JTextArea titleText = new JTextArea(); private JTextArea locationText = new JTextArea(); private JTextArea dateText = new JTextArea(); private JTextArea noteText = new JTextArea(); private JTextArea activityText = new JTextArea(); private JTextArea categoryText = new JTextArea(); private JTextField titleField = new JTextField(); private JTextField locationField = new JTextField(); private JTextField dateField = new JTextField(); private JTextField noteField = new JTextField(); private JTextField activityField = new JTextField(); private JTextField categoryField = new JTextField(); Object[] fields = { "Rubrik", titleField, "Plats", locationField, "Datum", dateField, "Anteckning", noteField, "Aktivitet", activityField, "Kategori", categoryField, }; JList listAct = new JList(); List activityList = new ArrayList(); // MyController controller = new MyController(); Activity activity = new Activity(); List listOfDataPoints = activity.getData(); Statistics stats = new Statistics(listOfDataPoints); StatisticsViewPanel statisticsViewPanel = new StatisticsViewPanel(); public LoginGUI() throws IOException { loginButton.addActionListener(n -> { try { ListenerLogIn(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }); DemoDBSingleton = DemoDB.getInstance(); programmainframe(); } private void logInframe() { f.setSize(800, 600); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); JPanel p = new JPanel(); p.setBackground(new Color(224, 255, 255)); p.setLayout(null); l.setFont(new Font("Tahoma", Font.PLAIN, 21)); l.setBounds(102, 173, 169, 41); p.add(l); textfieldUsername.setHorizontalAlignment(SwingConstants.CENTER); textfieldUsername.setFont(new Font("Tahoma", Font.PLAIN, 16)); textfieldUsername.setBounds(303, 177, 169, 41); p.add(textfieldUsername); l1.setFont(new Font("Tahoma", Font.PLAIN, 21)); l1.setBounds(102, 290, 93, 26); p.add(l1); textfieldPassword.setHorizontalAlignment(SwingConstants.CENTER); textfieldPassword.setFont(new Font("Tahoma", Font.PLAIN, 16)); textfieldPassword.setBounds(303, 287, 169, 41); p.add(textfieldPassword); loginButton.setBounds(334, 375, 110, 52); p.add(loginButton); f.getContentPane().add(p); JCheckBox hidepasswordBox = new JCheckBox("Visa Lösenord"); hidepasswordBox.setBackground(new Color(224, 255, 255)); hidepasswordBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if (hidepasswordBox.isSelected()) { textfieldPassword.setEchoChar((char) 0); } else { textfieldPassword.setEchoChar('*'); } } }); hidepasswordBox.setBounds(303, 335, 110, 23); p.add(hidepasswordBox); } public JFrame programmainframe() throws IOException { mainFrame.setSize(800, 600); mainFrame.setVisible(true); mainFrame.setJMenuBar(mb); mainFrame.getContentPane().setLayout(new BorderLayout()); mainFrame.setMinimumSize(new Dimension(800, 600)); tabbedPane.add("Dina Aktiviteter", createViewActPanel()); tabbedPane.add("Diagram för vald aktivitet", createViewDiagramPanel()); tabbedPane.add("Statistik för vald aktivitet", createViewStatisticsPanel()); tabbedPane.add("Kartbild över vald aktivitet", createViewMapPanel()); mainFrame.getContentPane().add(tabbedPane, BorderLayout.CENTER); JMenuBar mb = new JMenuBar(); menu = new JMenu("Meny"); importMenu = new JMenuItem("Importera aktivitet"); importMenu.addActionListener(importActionListener); exitMenu = new JMenuItem("Avsluta program"); exitMenu.addActionListener(exitActionListener); menu.add(importMenu); menu.add(exitMenu); mb.add(menu); mainFrame.setJMenuBar(mb); return mainFrame; } private JPanel createViewActPanel() { JPanel analogM = new JPanel(); scrollpane = new JScrollPane(listAct); scrollpane.setBounds(0, 1, 400, 511); scrollpane.setPreferredSize(new Dimension(400, 200)); listAct.addListSelectionListener(e -> selectActivity(e)); analogM.setLayout(null); analogM.add(scrollpane); JPanel actPanel = new JPanel(new GridLayout(6, 1)); actPanel.setBackground(Color.LIGHT_GRAY); actPanel.setBounds(400, 1, 379, 511); analogM.add(actPanel); JPanel titlePanel = new JPanel(); titlePanel.setBorder(BorderFactory.createTitledBorder("Rubrik: ")); titlePanel.setBackground(new Color(224, 255, 255)); titlePanel.setLayout(null); titleText.setBounds(10, 21, 359, 53); titleText.setBackground(new Color(224, 255, 255)); titlePanel.add(titleText); actPanel.add(titlePanel); JPanel locationPanel = new JPanel(); locationPanel.setBorder(BorderFactory.createTitledBorder("Plats: ")); locationPanel.setBackground(new Color(224, 255, 255)); locationPanel.setLayout(null); locationText.setBounds(10, 21, 359, 53); locationText.setBackground(new Color(224, 255, 255)); locationPanel.add(locationText); actPanel.add(locationPanel); JPanel datePanel = new JPanel(); datePanel.setBorder(BorderFactory.createTitledBorder("Datum: ")); datePanel.setBackground(new Color(224, 255, 255)); datePanel.setLayout(null); dateText.setBounds(10, 21, 359, 53); dateText.setBackground(new Color(224, 255, 255)); datePanel.add(dateText); actPanel.add(datePanel); JPanel notePanel = new JPanel(); notePanel.setBorder(BorderFactory.createTitledBorder("Anteckning: ")); notePanel.setBackground(new Color(224, 255, 255)); notePanel.setLayout(null); noteText.setBounds(10, 21, 359, 53); noteText.setBackground(new Color(224, 255, 255)); notePanel.add(noteText); actPanel.add(notePanel); JPanel activityPanel = new JPanel(); activityPanel.setBorder(BorderFactory.createTitledBorder("Aktivitet: ")); activityPanel.setBackground(new Color(224, 255, 255)); activityPanel.setLayout(null); activityText.setBounds(10, 21, 359, 53); activityText.setBackground(new Color(224, 255, 255)); activityPanel.add(activityText); actPanel.add(activityPanel); JPanel categoryPanel = new JPanel(); categoryPanel.setBorder(BorderFactory.createTitledBorder("Kategori")); categoryPanel.setBackground(new Color(224, 255, 255)); categoryPanel.setLayout(null); categoryText.setBounds(10, 21, 359, 53); categoryText.setBackground(new Color(224, 255, 255)); categoryPanel.add(categoryText); actPanel.add(categoryPanel); return analogM; } private JPanel createViewDiagramPanel() { JPanel panel = new JPanel(new GridLayout(4, 1)); if (activity.getData().size() > 0) { panel.add(new PlotView("HR", activity, tp -> tp.getHeartRate())); panel.add(new PlotView("Altitude", activity, tp -> tp.getAltitude())); panel.add(new PlotView("Speed", activity, tp -> tp.getSpeed())); panel.add(new PlotView("Cadence", activity, tp -> tp.getCadence())); panel.setVisible(true); } return panel; } private JPanel createViewStatisticsPanel() { JPanel statPanel = new JPanel(new GridLayout(2, 3)); statPanel.setPreferredSize(new Dimension(1000, 500)); // statPanel.setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); JPanel timePanel = new JPanel(); timePanel.setBorder(BorderFactory.createTitledBorder("Tid/Distans")); timePanel.setBackground(new Color(224, 255, 255)); tdp.setBackground(new Color(224, 255, 255)); timePanel.add(tdp); statPanel.add(timePanel); JPanel startTimepanel = new JPanel(); startTimepanel.setBorder(BorderFactory.createTitledBorder("Altitud")); startTimepanel.setBackground(new Color(224, 255, 255)); stp.setBackground(new Color(224, 255, 255)); startTimepanel.add(stp); statPanel.add(startTimepanel); JPanel startTimepanel1 = new JPanel(); startTimepanel1.setBorder(BorderFactory.createTitledBorder("Hastighet")); startTimepanel1.setBackground(new Color(224, 255, 255)); stp1.setBackground(new Color(224, 255, 255)); startTimepanel1.add(stp1); statPanel.add(startTimepanel1); JPanel startTimepanel2 = new JPanel(); startTimepanel2.setBorder(BorderFactory.createTitledBorder("Puls")); startTimepanel2.setBackground(new Color(224, 255, 255)); stp2.setBackground(new Color(224, 255, 255)); startTimepanel2.add(stp2); statPanel.add(startTimepanel2); JPanel startTimepanel3 = new JPanel(); startTimepanel3.setBorder(BorderFactory.createTitledBorder("Kadens")); startTimepanel3.setBackground(new Color(224, 255, 255)); stp3.setBackground(new Color(224, 255, 255)); startTimepanel3.add(stp3); statPanel.add(startTimepanel3); JPanel startTimepanel4 = new JPanel(); startTimepanel4.setBorder(BorderFactory.createTitledBorder("Lutning")); startTimepanel4.setBackground(new Color(224, 255, 255)); stp4.setBackground(new Color(224, 255, 255)); startTimepanel4.add(stp4); statPanel.add(startTimepanel4); return statPanel; } private JPanel createViewMapPanel() { JPanel mapPane = new JPanel(new BorderLayout()); if (listOfDataPoints.size() > 0) { mapPane.add(new PlotMap(listOfDataPoints)); } mapPane.setBackground(new Color(224, 255, 255)); mapPane.setVisible(true); return mapPane; } private void selectActivity(ListSelectionEvent e) // Lyssnarmetod { Activity selectedActivity = listAct.getSelectedValue(); if (selectedActivity != null) { stats = new Statistics(activity.getData()); updateStatistics(stats); tabbedPane.setComponentAt(0, createViewActPanel()); tabbedPane.setComponentAt(1, createViewDiagramPanel()); tabbedPane.setComponentAt(2, createViewStatisticsPanel()); tabbedPane.setComponentAt(3, createViewMapPanel()); } } public void updateStatistics(Statistics stats) { stats.calculateStatistics(); tdp.setText("\n Starttid: " + stats.getStartTime() + "\n Slutlig tid: " + stats.getEndTime() + "\n Total tid: " + stats.getTotalTime() + "\n Total distans" + stats.getTotalDistance()); stp.setText("\n Lägsta altitud: " + stats.getMinAltitude() + "\n Högsta altitud : " + stats.getMaxAltitude() + "\n Genomsnittlig altitud: " + stats.getAvgAltitude()); stp1.setText("\n Lägsta hastighet: " + stats.getMinSpeed() + "\n Högsta hastighet : " + stats.getMaxSpeed() + "\n Genomsnittlig hastighet: " + stats.getAvgSpeed()); stp2.setText("\n Lägsta puls: " + stats.getMinHeartrate() + "\n Högsta puls : " + stats.getMaxHeartrate() + "\n Genomsnittlig puls: " + stats.getAvgHeartrate()); stp3.setText("\n Lägsta kadens: " + stats.getMinCandence() + "\n Högsta kadens : " + stats.getMaxCandence() + "\n Genomsnittlig kadens: " + stats.getAvgCandence()); stp4.setText("\n Lägsta lutning: " + stats.getMinTilt() + "\n Högsta lutning : " + stats.getMaxTilt() + "\n Genomsnittlig lutning: " + stats.getAvgTilt()); } ActionListener importActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int returnValue = fc.showOpenDialog(mainFrame); if (returnValue == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); if (file != null) { activity.clear(); activity = new Activity(); String fileName = file.getAbsolutePath(); activity.csvFileReader(fileName); listOfDataPoints = activity.getData(); stats = new Statistics(listOfDataPoints); activityList.add(activity); listAct.setListData(new Vector(activityList)); int option = JOptionPane.showConfirmDialog(null, fields, "Skriv in aktivitetsdata: ", JOptionPane.OK_CANCEL_OPTION); if (option == JOptionPane.OK_OPTION) { String title = titleField.getText(); String location = locationField.getText(); String date = dateField.getText(); String note = noteField.getText(); String activity = activityField.getText(); String category = categoryField.getText(); titleText.setText(title); locationText.setText(location); dateText.setText(date); noteText.setText(note); activityText.setText(activity); categoryText.setText(category); } } } } }; ActionListener exitActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }; private void ListenerLogIn() throws IOException { if (userDao.login(textfieldUsername.getText(), textfieldPassword.getText())) { JOptionPane.showMessageDialog(null, "Välkommen " + textfieldUsername.getText() + "!"); programmainframe(); f.setVisible(false); } else JOptionPane.showMessageDialog(null, "Felaktigt användarnamn eller lösenord!!!"); } public static void main(String[] args) throws IOException { new LoginGUI(); } } 
submitted by gxldenhalos to learnprogramming [link] [comments]


2019.11.02 13:47 kwalk2 Adding mouselistener to item in list to update panels

first of all, I'm aware of the title being a a bit ambiguous, so I'm going to try to explain the issues I'm having more clearly.
I've created a program that imports data from csv.files, which consists of measure points like date, time, heart rate etc. The user is first met with a login screen, that connects to a database, which then lets the user get access to the mainframe of the program.
The program consists of a class called Activity, which has a method that reads the activity, along with some other methods. This class then gets impemented by another class called Datapoint, which splits the different values from the csv.files into measuring points like date, time, longitude and latitude.
Finally, the third class that only consists of data is called Statistics, which takes the values and adds them into datapoints such as average, min and max speed etc.
Now to my problem. I've created a GUI for this which let's the user import csv.files, and then add the datapoints from the file into a map, a plotted diagram, and a page which shows the values from the statistics class. This works fine, and everything is updated when imported.
The activities chosen are then being added to a JList, from where the user can chose a certain activity, which preferrably a mouselistener. When the activity in the list is double-clicked, the graphs should update with the chosen activity's datapoints from the list, but I don't know how to do it. I'm pretty sure the duplicate import has something to do with the list in the importActionListener() method, but I can't wrap my head around why
The other issue is that the imported activity writes over the old one, so that the JList contains a duplicate of the activities imported.
Instead of just showing the GUI, I figured I'd provide you with all the information regarding the classes that the GUI handles, so it's easier for you to pinpoint how I should solve my problem. I'll post the Classes below.
Activity:
package model; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Activity { private String file; private String title; private String location; private String note; private String activityType; private String category; private List dataPoints = new ArrayList(); private String line = ""; //private String[] dataPoints; public Activity (){ //csvFileReader("activity_103378385.csv"); } public void csvFileReader(String file) { try { this.file = file; BufferedReader in = new BufferedReader(new FileReader(file)); line = in.readLine(); // läser bort första raden av aktiviteten while ((line = in.readLine()) != null) { line = line.replaceAll(",", "."); String[] data = line.split(";"); dataPoints.add(new DataPoint(data)); } in.close(); /* for (DataPoint act : dataPoints) System.out.println(act); */ } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public List getData() { return dataPoints; } public void clear() { dataPoints.clear(); } public String getTitle() { return title; } public String getLocation() { return location; } public String getNote() { return note; } public String getActivityType() { return activityType; } public String getCategory() { return category; } @Override public String toString(){ return file.substring(file.lastIndexOf("\\")+1, file.length()-4); } } 
And the GUI (where I'm facing the difficulties):
package view; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Observable; import java.util.Vector; import javax.swing.*; import dao.UserDAO; import db.DemoDB; import model.Activity; import model.DataPoint; import model.Statistics; public class LoginGUI extends JFrame{ DemoDB DemoDBSingleton = null; JScrollPane scrollpane; private JTabbedPane tabbedPane = new JTabbedPane(); UserDAO userDao = new UserDAO(); JFrame mainFrame = new JFrame("Välkommen till din app"); JFrame f = new JFrame("User Login"); JLabel l = new JLabel("Användarnamn:"); JLabel l1 = new JLabel("Lösenord:"); JTextField textfieldUsername = new JTextField(10); JPasswordField textfieldPassword = new JPasswordField(10); JButton loginButton = new JButton("Logga In"); JFileChooser fc = new JFileChooser(); JMenuBar mb = new JMenuBar(); JFrame jf; JMenu menu; JMenuItem importMenu, exitMenu; JList listAct = new JList(); List activityList = new ArrayList(); //MyController controller = new MyController(); Activity activity = new Activity(); List listOfDataPoints = activity.getData(); Statistics stats = new Statistics(listOfDataPoints); public LoginGUI() throws IOException { loginButton.addActionListener(n -> { try { ListenerLogIn(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }); DemoDBSingleton = DemoDB.getInstance(); // logInframe(); } private JFrame ProgramMainFrame() throws IOException { mainFrame.setSize(800, 600); mainFrame.setVisible(true); mainFrame.setJMenuBar(mb); mainFrame.getContentPane().setLayout(new BorderLayout()); mainFrame.getContentPane().add(tabbedPane, BorderLayout.CENTER); JMenuBar mb = new JMenuBar(); menu = new JMenu("Meny"); importMenu = new JMenuItem("Importera aktivitet"); importMenu.addActionListener(importActionListener); exitMenu = new JMenuItem("Avsluta program"); exitMenu.addActionListener(exitActionListener); menu.add(importMenu); menu.add(exitMenu); mb.add(menu); mainFrame.setJMenuBar(mb); return mainFrame; /* * JPanel listholder = new JPanel(); * listholder.setBorder(BorderFactory.createTitledBorder("ListPanel")); * mainFrame.add(listholder); listholder.setVisible(true); * listholder.setSize(500,400); */ } private JPanel createViewActPanel() { JPanel analogM = new JPanel(new BorderLayout()); analogM.setBackground(new Color(224, 255, 255)); scrollpane = new JScrollPane(listAct); scrollpane.setPreferredSize(new Dimension(400, 200)); analogM.add(scrollpane, BorderLayout.WEST); return analogM; } private JPanel createViewDiagramPanel() { JPanel panel = new JPanel(new GridLayout(4, 1)); if( activity.getData().size() > 0) { panel.add(new PlotView("HR", activity, tp -> tp.getHeartRate())); panel.add(new PlotView("Altitude", activity, tp -> tp.getAltitude())); panel.add(new PlotView("Speed", activity, tp -> tp.getSpeed())); panel.add(new PlotView("Cadence", activity, tp -> tp.getCadence())); panel.setVisible(true); } return panel; } private JPanel createViewStatisticsPanel() { stats.calculateStatistics(); JPanel statPanel = new JPanel(new GridLayout(2, 3)); statPanel.setPreferredSize(new Dimension(1000, 500)); // statPanel.setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); JPanel timePanel = new JPanel(); timePanel.setBorder(BorderFactory.createTitledBorder("Tid/Distans")); timePanel.setBackground(new Color(224, 255, 255)); JTextArea tdp = new JTextArea("\n Starttid: " + stats.getStartTime() + "\n Slutlig tid: " + stats.getEndTime() + "\n Total tid: " + stats.getTotalTime() + "\n Total distans" + stats.getTotalDistance()); tdp.setBackground(new Color(224, 255, 255)); timePanel.add(tdp); statPanel.add(timePanel); JPanel startTimepanel = new JPanel(); startTimepanel.setBorder(BorderFactory.createTitledBorder("Altitud")); startTimepanel.setBackground(new Color(224, 255, 255)); JTextArea stp = new JTextArea("\n Lägsta altitud: " + stats.getMinAltitude() + "\n Högsta altitud : " + stats.getMaxAltitude() + "\n Genomsnittlig altitud: " + stats.getAvgAltitude()); stp.setBackground(new Color(224, 255, 255)); startTimepanel.add(stp); statPanel.add(startTimepanel); JPanel startTimepanel1 = new JPanel(); startTimepanel1.setBorder(BorderFactory.createTitledBorder("Hastighet")); startTimepanel1.setBackground(new Color(224, 255, 255)); JTextArea stp1 = new JTextArea("\n Lägsta hastighet: " + stats.getMinSpeed() + "\n Högsta hastighet : " + stats.getMaxSpeed() + "\n Genomsnittlig hastighet: " + stats.getAvgSpeed()); stp1.setBackground(new Color(224, 255, 255)); startTimepanel1.add(stp1); statPanel.add(startTimepanel1); JPanel startTimepanel2 = new JPanel(); startTimepanel2.setBorder(BorderFactory.createTitledBorder("Puls")); startTimepanel2.setBackground(new Color(224, 255, 255)); JTextArea stp2 = new JTextArea("\n Lägsta puls: " + stats.getMinHeartrate() + "\n Högsta puls : " + stats.getMaxHeartrate() + "\n Genomsnittlig puls: " + stats.getAvgHeartrate()); stp2.setBackground(new Color(224, 255, 255)); startTimepanel2.add(stp2); statPanel.add(startTimepanel2); JPanel startTimepanel3 = new JPanel(); startTimepanel3.setBorder(BorderFactory.createTitledBorder("Kadens")); startTimepanel3.setBackground(new Color(224, 255, 255)); JTextArea stp3 = new JTextArea("\n Lägsta kadens: " + stats.getMinCandence() + "\n Högsta kadens : " + stats.getMaxCandence() + "\n Genomsnittlig kadens: " + stats.getAvgCandence()); stp3.setBackground(new Color(224, 255, 255)); startTimepanel3.add(stp3); statPanel.add(startTimepanel3); JPanel startTimepanel4 = new JPanel(); startTimepanel4.setBorder(BorderFactory.createTitledBorder("Lutning")); startTimepanel4.setBackground(new Color(224, 255, 255)); JTextArea stp4 = new JTextArea("\n Lägsta lutning: " + stats.getMinTilt() + "\n Högsta lutning : " + stats.getMaxTilt() + "\n Genomsnittlig lutning: " + stats.getAvgTilt()); stp4.setBackground(new Color(224, 255, 255)); startTimepanel4.add(stp4); statPanel.add(startTimepanel4); return statPanel; } private JPanel createViewMapPanel() { JPanel mapPane = new JPanel(); if(listOfDataPoints.size() > 0) { mapPane.add(new PlotMap(listOfDataPoints)); } mapPane.setBackground(new Color(224, 255, 255)); mapPane.setVisible(true); return mapPane; } ActionListener importActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int returnValue = fc.showOpenDialog(mainFrame); if(returnValue == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); if(file != null) { activity.clear(); String fileName = file.getAbsolutePath(); activity.csvFileReader(fileName); listOfDataPoints = activity.getData(); activityList.add(activity); listAct.setListData(new Vector(activityList)); tabbedPane.removeAll(); tabbedPane.add("Dina Aktiviteter", createViewActPanel()); tabbedPane.add("Diagram för vald aktivitet", createViewDiagramPanel()); tabbedPane.add("Statistik för vald aktivitet", createViewStatisticsPanel()); tabbedPane.add("Kartbild över vald aktivitet", createViewMapPanel()); mainFrame.getContentPane().add(tabbedPane, BorderLayout.CENTER); } } } }; ActionListener exitActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }; public static void main(String[] args) throws IOException { new LoginGUI(); } 
}
submitted by kwalk2 to learnprogramming [link] [comments]


2015.10.05 13:54 MolnTroll $800 pc NOT primarily for gaming

What will you be doing with this PC? Be as specific as possible, and include specific games or programs you will be using.
As mentioned in the title the PC will primarily not be used för gaming (might be som light gaming going on, no "high end"). I plan to use it for Photoshop, browsing the internet and watching/streaming videos and music.
Mostly I want it to work fast and preferably silently.
What is your maximum budget before rebates/shipping/taxes?
Absolute maximum of $800. Though lower is welcome.
When do you plan on building/buying the PC? Note: beyond a week or two from today means any build you receive will be out of date when you want to buy.
I plan to be done by the end of October.
What, exactly, do you need included in the budget? (ToweOS/monitokeyboard/mouse/etc)
Only the computer. I have OS, monitor, keyboard etc. I plan to reuse my old hard drives but want an SSD for speed.
I need a case, motherboard, cpu, ram, SSD, power supply, might need a GPU though I doubt I need a very powerful one. Wireless Internet connection is a must, preferably built in and not an usb adapter.
Which country (and state/province) will you be purchasing the parts in? If you're in US, do you have access to a Microcenter location?
I'm in Sweden. Not sure what page use, www.pricerunner.se or maybe amazon.co.uk.
If reusing any parts (including monitor(s)/keyboard/mouse/etc), what parts will you be reusing? Brands and models are appreciated.
Will be reusing monitor, speakers, mouse, keyboard and two hard drives (don't know their specs other than storage space). As mentioned I want a SSD.
Will you be overclocking? If yes, are you interested in overclocking right away, or down the line? CPU and/or GPU?
I'm not sure how that works. If is easy and safe then maybe.
Are there any specific features or items you want/need in the build? (ex: SSD, large amount of storage or a RAID setup, CUDA or OpenCL support, etc)
As mentioned SSD (120gb is enough) and wireless Internet connection. If you have some recommendations for making the computer more silent they're welcome.
Do you have any specific case preferences (Size like ITX/microATX/mid-towefull-tower, styles, colors, window or not, LED lighting, etc), or a particular color theme preference for the components?
No leds or anything like that, I want it cheap with enough space for two extra 3.5 hard drives and preferably air space to avoid overheating.
Do you need a copy of Windows included in the budget? If you do need one included, do you have a preference?
I have windows already.
Extra info or particulars:
Thank you for your help!
submitted by MolnTroll to buildapcforme [link] [comments]


2012.11.05 19:06 tabledresser [Table] IAmA: Garbage engineer from Sweden ask me anything!

Verified? (This bot cannot verify AMAs just yet)
Date: 2012-10-30
Link to submission (Has self-text)
Link to my post
Questions Answers
In your opinion, what is holding back other countries from adopting this technique? Having the goals set by a municipality that has control over the entire process so there are 100 of different companies/organisations who get in the way.
So in what point of your life did you decide that you actually want to be a garbage engineer? I'm still not sure this is what I want to do :)
How do you say "garbage" in Swedish? I want to make sure Ikea isn't playing a cruel trick on me. Sopor.
How efficient is the process? The US has attempted the waste to energy idea before, but the costs never balance out. It started as a way of getting rid of waste. Landfills take up a lot of space and we dont have that much land in Europe compared to the US. You also need a good infrastructure to deliver the energy, we mostly use it for heating homes and that is done by heating the water and sending it through pipes to peoples radiators, it is a lot more efficient than transporting electricity and using radiators that run on that.
Hey trash man, thanks for the ama. 2] In the article, it seemed like they did end up with a small amount of quite concentrated, very toxic ash. What do you do with this stuff in the long term? Like someone already answered it's landfilled or used in concrete/asphalt for roads.
1] Sounds like they scrub the allmighty living shit out of the emissions. What is the worst thing in the remaining emissions, and how does it compare to comparable fossil fuel pollution? 3] What do you do at the plant? One thing that is not removed is Helium unfortunately I dont actually work at the plant, I work with the part that handles the collecting of the garbage, a lot of costumer contact to make sure their waste collection works out and introducing separate collection of organic waste.
Does the trash burn by itself or do you need to mix like fuel or gas? There is no extra fuel added but it needs to be mixed from different sources to get a good mix.
Does the process result in a net energy gain or does more of the added fuel go in then usable heat comes out? And how competitive is the 'price' of the energy gained compared to a normal (commercial?) power-generator (gas, coal, biomass)? Or is it just a 'free' by-product that'd be a shame to waste? Because you have to spend so much money on cleaning out pollution from this mixed fuel it's not as competitive as oil/coal. But since it is as you say a "free" by-product it's better to get the energy from it than putting it in landfills.
3] That's cool you're separating organics... I assume this is getting composted.. how are you doing the composting and what happens to the compost? So you get both the energy and all the minerals from the organic waste and can recycle it.
How did Sweden decide on what land would be used for this imported garbage? What factors were there that might or might not be obvious to someone not in the field or who is a Swede? Some countries like Italy is not very good to get waste from because you can get litterally anything in what is supposed to be household waste (toxic waste etc.) So preferably from a country that has organized collecting the waste but no way of getting rid off it.
And that they are willing to pay us for handling their waste ofc.
I just wanted to say thanks for all that you do. Sweden is quite the role model in this department and I hope that other countries are looking up to you. On that note, what do you think needs to happen to encourage the rest of the world(mostly USA) to get involved with more alternative energy production? Probably the aversion americans have of the state/municipalities. You can do a lot more long term plans like setting up the infrastructure of garbage collecting and energy transportation if it's one big organisation that does it instead of many small ones.
Can you tell us about the negative side effects, if there are any? Negative side is that if you dont invest a lot of money from the start the incineration plant will pollute the air.
Sounds like this would produce a lot of CO2? But i guess engineers are smart enough to measure that etc. What ARE some of the undesireable byproducts? In the fly ash you get a lot of dangerous byproducts and that still needs to go to landfilling because we dont have any good way of recycling it.
It does produce a lot of CO2 but compared to landfill where methane gas is produced you do less harm to the environment.
I thought CO2 had a much longer residence time than methane though? otherwise it sounds good. I just want to know it isn't too good to be true. Would love to see some solid studies about this stuff! Link to www.avfallsverige.se
What's the strangest thing you've ever found ? (in garbage) I dont collect garbage myself but one of my colleges who used to do it once found a whole pigs head in a normal garbage bin in an appartment complex.
Om vi sopproducenter kunde göra en sak för att göra ditt och dina kollegors liv enklare, vad vore denna sak? Läsa informationen vi skickar ut och följa den :) Det räcker väldigt långt.
What's the situation with air pollution from the incineration? Straight out the chimney or are the fumes captured and filtered somehow? There is obviously screening for items that are hazardous when burnt, what's the procedure and is it effective? Is it any better, environmentally, to burn the rubbish rather than bury it? It goes through several stages of filtering from electrolysis to good old fashioned filters.
Is "garbage engineer" a degree, or did you major in engineering and minor in garbage? Nah was just a funny title for the thread. But my work title is Planing engineer which is a bit off since I do not have an engineering degree.
Is the feeling of doing something amazing for the benefit of others provide you with a sense of pride and joy like it should? Some days when you solve a problem or done some information campaign that you see result from it feels kind of that way. Some days when nothing works like it should and people have a hard time getting rid of their trash it's anoying as hell.
There is a blockage in my flats waste shoot. Could you send someone to fix it? I am in Vårbergsplan 4, Skärholmen. Sorry dude I work in Malmö.
Isn't Sweden producing massive amounts of air pollution with the method of incineration? Have you heard of plasmafication? Any thoughts on switching to a cleaner, more efficient technology? It's up to the different inciniration plants what way they do it and when they invest in new technology so I'm sure there are plenty of people in Sweden who are looking at it but I'm not sure if anyone is switching over to it at the moment.
This question is more about you being Swedish, and kind of off topic. I'm a Norwegian, and I've always wondered if you guys listen to our music much? I mean, we love your music. Have you heard of/Do you listen to Kaizers Orchestra, Mods, Paperboys, Röyksopp or any other Norwegian bands? I was in Norway this summer for a wedding and we discussed that abit between some swedes and norwegians. I think the conclusion was that you listen to more swedish music than we listen to norwegian.
What do you do when u come across the frequent Swedish corpses from hardcore experimental-bondage gone wrong?!??!! Drink snaps to kill the pain.
Can you please engineer all garbage of the future to flat-pack? No I'm a garbage at engineering.
Malmö is a really beautiful city, but reputed for crime; Do you notice any of it during your everyday life? (Considering moving there someday) No I never notice any reason for the bad rep this city has.
Which do you like better: Volvo or SAAB? SAAB.
Hi, I'm not sure if you are stil answering questions. But I was wondering if you can tell me where to find general information on how Sweden has managed to pull this off and what systems they have put in place. Thank you. Link to www.avfallsverige.se
I thought he was just a shitty engineer and was being very honest with himself. Considering that I have no real engineering title then yeah.
Jag talar inte Svenska men jag ville bara säga hej till en Svensk i sitt modersmål. Hej hej!
Tell me everything you know about automated vacuum collection of garbage. CBA doing that on reddit would take too long.
I can tell you it's quite expensive to build and maintain the system. If you think it's worth it go for it!
Last updated: 2012-11-09 11:57 UTC Next update: 2012-11-09 17:57 UTC
This post was generated by a robot! Send all complaints to epsy.
submitted by tabledresser to tabled [link] [comments]


Vänner med förmner medan dating - Casey anthony dating ...